#ifndef _CSR_SYNERGY_BT_CONFIG_GLOBAL_H
#define _CSR_SYNERGY_BT_CONFIG_GLOBAL_H
/******************************************************************************
 Copyright (c) 2011-2023 Qualcomm Technologies International, Ltd.
 All Rights Reserved.
 Qualcomm Technologies International, Ltd. Confidential and Proprietary.

REVISION:      $Revision: #9 $
******************************************************************************/

#ifdef __cplusplus
    extern "C" {
#endif

/* BlueStack on host */
#define BUILD_FOR_HOST 
#undef DM_ACL_DUMP_DEBUG
#undef INSTALL_VM_MODULE
#ifndef INSTALL_DM_POWERSTATES_MODULE
#define INSTALL_DM_POWERSTATES_MODULE
#endif
#undef INSTALL_L2CAP_CRC
#undef INSTALL_L2CAP_ROUTER_SUPPORT
#undef L2CAP_HCI_DATA_CREDIT_CHECKS
#undef L2CAP_HCI_DATA_CREDIT_CHECKS_PANIC
#undef L2CAP_HCI_DATA_CREDIT_SLOW_CHECKS

/* ---------- General Blue Stack flags ---------- */
#ifdef CSR_BT_BLUE_STACK_DEBUG
#define SM_DEBUG_PAIRING_SANITY
#define DM_ACL_DEBUG
#define INSTALL_L2CAP_DEBUG
#endif

#ifndef INSTALL_VSC
#define INSTALL_VSC
#endif

#ifndef INSTALL_MULTIPLE_EXTENDED_FEATURES_PAGES
#define INSTALL_MULTIPLE_EXTENDED_FEATURES_PAGES
#endif

#ifndef INSTALL_BREDR_SECURE_CONNECTIONS
#define INSTALL_BREDR_SECURE_CONNECTIONS
#endif

#ifndef INSTALL_BREDR_PING
#define INSTALL_BREDR_PING
#endif

#ifndef INSTALL_SC_ESCO_PARAMS_REWRITE
#define INSTALL_SC_ESCO_PARAMS_REWRITE
#endif

#ifdef CSR_BT_SC_ONLY_MODE_ENABLE
#define INSTALL_GAP_SC_ONLY_MODE
#endif

/* L2CAP mandatory settings */
#define INSTALL_L2CAP_MODULE
#define INSTALL_L2CAP_ENHANCED_SUPPORT
#define USB_ACL_DATA_FIX

#define INSTALL_L2CAP_QOS_SUPPORT 

/* SDP mandatory settings */
#define INSTALL_SDP_MODULE
#undef INSTALL_SDP_STATIC_SERVICE_RECORD_SUPPORT
#define INSTALL_CMN_ENHANCED_SDP_FEATURE

/* SC mandatory settings */
#define CSR_BT_INSTALL_CM_EVENT_MASK_SUBSCRIBE_ACL_CONNECTION

/* ---------- Core stack FSM-flags----------- */
#ifdef CSR_BT_INSTALL_L2CAP_UCD_SUPPORT
#define INSTALL_L2CAP_UCD_SUPPORT
#define CSR_BT_INSTALL_L2CAP_CONNLESS_SUPPORT
#endif

#ifdef CSR_BT_INSTALL_L2CAP_CONNLESS_SUPPORT
#define INSTALL_L2CAP_CONNLESS_SUPPORT
#define INSTALL_L2CAP_FIXED_CHANNEL_SUPPORT
#define INSTALL_L2CAP_FIXED_CHANNEL_BASE_SUPPORT
#endif


#ifndef CSR_AMP_ENABLE
#define DISABLE_AMP_FSM_SUPPORT /* Used only by AMP */
#if !defined(CSR_BT_LE_ENABLE) && !defined(INSTALL_L2CAP_FIXED_CHANNEL_BASE_SUPPORT)
#define DISABLE_L2CAP_FIXED_CHANNEL_FSM_SUPPORT /* Used by LE, AMP */
#endif
#endif


/* ---------- Profile dependent flags ---------- */

/* AMP mandatory settings */
#ifdef CSR_AMP_ENABLE
#define CSR_BT_INSTALL_L2CAP_MODULE
#define INSTALL_AMP_SUPPORT
#define INSTALL_L2CAP_FIXED_CHANNEL_BASE_SUPPORT
#define INSTALL_L2CAP_FIXED_CHANNEL_SUPPORT
#define INSTALL_L2CAP_FLOWSPEC_SUPPORT
#define CSR_BT_INSTALL_CM_AFH
#else
#define EXCLUDE_CSR_BT_AMPM_MODULE
#endif /* CSR_AMP_ENABLE */

/* BLE mandatory settings */
#ifdef CSR_BT_LE_ENABLE
#define CSR_BT_INSTALL_L2CAP_MODULE
#define CSR_BT_INSTALL_CM_EVENT_MASK_SUBSCRIBE_BLUECORE_INITIALIZED
#define CSR_BT_INSTALL_CM_EVENT_MASK_SUBSCRIBE_ACL_CONNECTION
#define CSR_BT_INSTALL_CM_EVENT_MASK_SUBSCRIBE_LOCAL_NAME_CHANGE
#define CSR_BT_INSTALL_CM_EVENT_MASK_SUBSCRIBE_LOW_ENERGY
#define CSR_BT_INSTALL_CM_EVENT_MASK_SUBSCRIBE_LE_OWN_ADDR_TYPE_CHANGE
#define BUILD_FOR_HOST_FOR_ENCRYPTION_ATT_RACE
#define BUILD_FOR_HOST_FOR_ENCRYPTION_SMP_RACE
#define INSTALL_ULP
#if (defined(CSR_BT_INSTALL_EXTENDED_ADVERTISING) || \
    defined(CSR_BT_INSTALL_EXTENDED_SCANNING) || \
    defined(CSR_BT_INSTALL_PERIODIC_ADVERTISING) || \
    defined(CSR_BT_INSTALL_PERIODIC_SCANNING))
#define ENABLE_ADV_REPORTING_WITH_MBLK
#define GAM_IOP_USE_SECONDARY_ADV_CH
#define INSTALL_ADVERTISING_EXTENSIONS
#endif /* End of  CSR_BT_INSTALL_EXTENDED_ADVERTISING || CSR_BT_INSTALL_EXTENDED_SCANNING ||
        * CSR_BT_INSTALL_PERIODIC_ADVERTISING || CSR_BT_INSTALL_PERIODIC_SCANNING */

#if defined(CSR_BT_INSTALL_CM_EVENT_MASK_SUBSCRIBE_LE_SUBRATE_CHANGE)
#define INSTALL_LE_ENHANCED_CONN_UPDATE_SUPPORT
#endif

#define INSTALL_ATT_MODULE
#ifdef CSR_BT_GATT_INSTALL_EATT
#define INSTALL_EATT
#define INSTALL_L2CAP_ECBFC
#define INSTALL_L2CAP_LECOC_CB
#endif /* CSR_BT_GATT_INSTALL_EATT */
#define INSTALL_ATT_BREDR
#define INSTALL_L2CAP_FIXED_CHANNEL_BASE_SUPPORT
#define INSTALL_L2CAP_FIXED_CHANNEL_SUPPORT
#ifdef CSR_BT_INSTALL_DLE_SUPPORT
#define INSTALL_DLE
#endif /* CSR_BT_INSTALL_DLE_SUPPORT */
#define INSTALL_SM_MODULE
#define INSTALL_SM_PRIVACY_1P2
#define INSTALL_DM_CONNECTIONLESS_FSM
#define INSTALL_DM_CONNECTIONLESS_PARAMETERS_ENHANCEMENT
#define INSTALL_DM_CONNECTIONLESS_WHITE_LIST_ENHANCEMENT
#define INSTALL_SM_PRIVACY_1P2_DUMMY_RL
#ifdef CSR_BT_INSTALL_LESC_SUPPORT
#define INSTALL_SM_LE_SECURE_CONNECTIONS
#define INSTALL_LE_PING
#define INSTALL_KEYPRESS_NOTIFICATION
#endif
#ifdef CSR_BT_INSTALL_CTKD_SUPPORT
#ifndef CSR_BT_DISABLE_H7_CTKD
#define INSTALL_SM_LE_SECURE_CONNECTIONS_H7
#endif
#else
#define DISABLE_SM_CROSS_TRNSPT_KEY_DERIVATION
#endif
#define SM_HAS_FUNCTION_FOR_RAND
#define INSTALL_CPRP
#define INSTALL_SIFE
#ifndef EXCLUDE_CSR_BT_GATT_MODULE_OPTIONAL
#define CSR_BT_INSTALL_GATT_PARAM_CONNECTION
#endif
#ifndef EXCLUDE_CSR_BT_PROX_SRV_MODULE
#define CSR_BT_INSTALL_CM_READ_TX_POWER_LEVEL
#endif
#ifndef EXCLUDE_CSR_BT_THERM_SRV_MODULE
#endif

#define SYNERGY_GATT_SD_ENABLE
#define SYNERGY_MCP_ENABLE

#else /* CSR_BT_LE_ENABLE */
#define CSR_BT_EXCLUDE_SET_BLE_CONNECTION_PARAMETERS
#define CSR_BT_EXCLUDE_SM_SECURITY
#define EXCLUDE_CSR_BT_ATT_MODULE
#define EXCLUDE_CSR_BT_GATT_MODULE
#define EXCLUDE_CSR_BT_GATT_PRIVATE_MODULE
#define EXCLUDE_CSR_BT_THERM_SRV_MODULE
#define EXCLUDE_CSR_BT_PROX_SRV_MODULE
#endif /* CSR_BT_LE_ENABLE */

#ifndef EXCLUDE_CSR_BT_AVRCP_MODULE 
#define CSR_BT_INSTALL_L2CAP_MODULE
#ifndef EXCLUDE_CSR_BT_AVRCP_MODULE_OPTIONAL
#define INSTALL_AVRCP_CUSTOM_SECURITY_SETTINGS
#ifndef EXCLUDE_CSR_BT_AVRCP_CT_MODULE
#define CSR_BT_INSTALL_AVRCP_CT_13_AND_HIGHER
#define CSR_BT_INSTALL_AVRCP_13_AND_HIGHER
#ifndef EXCLUDE_CSR_BT_AVRCP_IMAGING_MODULE
#define CSR_BT_INSTALL_AVRCP_COVER_ART
#define CSR_BT_INSTALL_AVRCP_CT_COVER_ART
#define CSR_BT_OBEX_GOEP_20_CAPABLE_PROFILE_ENABLED
#define CSR_BT_INSTALL_OBEX_UTIL_XML
#define CSR_BT_INSTALL_OBEX_UTIL
/* Obex features required by CT Cover Art */
#define CSR_BT_INSTALL_OBEX_CONTEXT_ID
/*
#define CSR_BT_INSTALL_OBEX_HEADER_AUTH_CHALLENGE
#define CSR_BT_INSTALL_OBEX_HEADER_AUTH_RESPONSE
#define CSR_BT_INSTALL_OBEX_HEADER_APP_PARAMS
*/
#define CSR_BT_INSTALL_OBEX_CLI_GET
#define CSR_BT_INSTALL_OBEX_HEADER_USER_DEFINE
/*
#define CSR_BT_INSTALL_OBEX_CLI_HEADER_TARGET_WHO_CID
*/
#define CSR_BT_INSTALL_OBEX_COMMON_CALLBACK
#define CSR_BT_INSTALL_OBEX_SERVICE_DISCONNECT
#endif /* ! EXCLUDE_CSR_BT_AVRCP_IMAGING_MODULE */
#define INSTALL_AVRCP_UNIT_COMMANDS
#endif /* ! EXCLUDE_CSR_BT_AVRCP_CT_MODULE */

#ifndef EXCLUDE_CSR_BT_AVRCP_TG_MODULE
#define CSR_BT_INSTALL_AVRCP_TG_13_AND_HIGHER
#define CSR_BT_INSTALL_AVRCP_13_AND_HIGHER
#ifndef EXCLUDE_CSR_BT_AVRCP_IMAGING_MODULE
#define CSR_BT_INSTALL_AVRCP_COVER_ART
#define CSR_BT_INSTALL_AVRCP_TG_COVER_ART
#define CSR_BT_OBEX_GOEP_20_CAPABLE_PROFILE_ENABLED
#define CSR_BT_INSTALL_OBEX_UTIL_XML
#define CSR_BT_INSTALL_OBEX_UTIL
#define CSR_BT_INSTALL_OBEX_SRV_GET
#define CSR_BT_INSTALL_OBEX_UTIL_SERV_PUT_GET_WITH_HEADER_EXT
#define CSR_BT_INSTALL_OBEX_SRV_HEADER_TARGET_WHO_CID
#define CSR_BT_INSTALL_OBEX_CONTEXT_ID
#define CSR_BT_INSTALL_OBEX_CLI_HEADER_TARGET_WHO_CID
#define CSR_BT_INSTALL_OBEX_HEADER_USER_DEFINE
#define CSR_BT_INSTALL_OBEX_UTIL_IMG_OFFSET
#endif /* ! EXCLUDE_CSR_BT_AVRCP_IMAGING_MODULE */
#endif /* ! EXCLUDE_CSR_BT_AVRCP_TG_MODULE */

#define CSR_BT_INSTALL_AVRCP_PLAYER_APP_SETTINGS
#define INSTALL_AVRCP_METADATA_ATTRIBUTES
#define INSTALL_AVRCP_NOTIFICATIONS
#define INSTALL_AVRCP_DEACTIVATE
#define INSTALL_AVRCP_CANCEL_CONNECT
#define INSTALL_AVRCP_MEDIA_PLAYER_SELECTION

#endif /* EXCLUDE_CSR_BT_AVRCP_MODULE_OPTIONAL */
#endif /* EXCLUDE_CSR_BT_AVRCP_MODULE */

#ifndef EXCLUDE_CSR_BT_AV_MODULE 
#define CSR_BT_INSTALL_L2CAP_MODULE
#ifndef EXCLUDE_CSR_BT_AV_OPTIONAL
#define  INSTALL_AV_CUSTOM_SECURITY_SETTINGS
#define CSR_BT_INSTALL_AV_SET_QOS_INTERVAL
#define CSR_BT_INSTALL_AV_CHANNEL_INFO_SUPPORT
#define INSTALL_AV_STREAM_DATA_APP_SUPPORT
#define INSTALL_AV_DEACTIVATE
#define INSTALL_AV_CANCEL_CONNECT
#define INSTALL_AV_SECURITY_CONTROL
#define INSTALL_AV_GET_CONFIGURATION
#endif /* EXCLUDE_CSR_BT_AV_OPTIONAL */
#endif /* EXCLUDE_CSR_BT_AV_MODULE */

#ifndef EXCLUDE_CSR_BT_HF_MODULE
#define CSR_BT_INSTALL_RFC_MODULE
#define CSR_BT_INSTALL_SCO_MODULE
#ifndef EXCLUDE_CSR_BT_HF_MODULE_OPTIONAL
#define INSTALL_HF_CUSTOM_SECURITY_SETTINGS 
#define CSR_BT_INSTALL_HF_CONFIG_AUDIO
#endif /*!EXCLUDE_CSR_BT_HF_MODULE_OPTIONAL */
#endif /*!EXCLUDE_CSR_BT_HF_MODULE */


#ifndef EXCLUDE_CSR_BT_HFG_MODULE
#define CSR_BT_INSTALL_RFC_MODULE
#define CSR_BT_INSTALL_SCO_MODULE
#define CSR_BT_INSTALL_CM_WRITE_VOICE_SETTINGS
#ifndef EXCLUDE_CSR_BT_HFG_MODULE_OPTIONAL
#define CSR_BT_INSTALL_HFG_CONFIG_AUDIO
#define CSR_BT_INSTALL_HFG_CONFIG_SINGLE_ATCMD
#define CSR_BT_INSTALL_HFG_CONFIG_ATCMD_HANDLING
#define INSTALL_HFG_CUSTOM_SECURITY_SETTINGS
#endif /*! EXCLUDE_CSR_BT_HFG_MODULE_OPTIONAL */
#endif /*! EXCLUDE_CSR_BT_HFG_MODULE */

#ifndef EXCLUDE_CSR_BT_DG_MODULE 
#define CSR_BT_INSTALL_RFC_MODULE
#endif


#ifndef EXCLUDE_CSR_BT_DUNC_MODULE 
#define CSR_BT_INSTALL_RFC_MODULE
#define CSR_BT_INSTALL_SDC_SET_PORT_PAR
#endif

#ifndef EXCLUDE_CSR_BT_AT_MODULE 
/* Requiers DG_MODULE */
#endif



/*******  OBEX PROFILES ********/

#ifndef EXCLUDE_CSR_BT_OPC_MODULE 
#define CSR_BT_INSTALL_RFC_MODULE
#define CSR_BT_OBEX_GOEP_20_CAPABLE_PROFILE_ENABLED
#ifndef EXCLUDE_CSR_BT_OPC_MODULE_OPTIONAL
#define CSR_BT_INSTALL_OBEX_HEADER_DESCRIPTION
#define CSR_BT_INSTALL_OPC_GET /* Optional OPC feature */
#endif                                 
#ifdef CSR_BT_INSTALL_OPC_GET
#define CSR_BT_INSTALL_OBEX_CLI_GET
#endif
#endif

#ifndef EXCLUDE_CSR_BT_OPS_MODULE 
#define CSR_BT_INSTALL_RFC_MODULE
#define CSR_BT_INSTALL_OBEX_SRV_GET
#define CSR_BT_OBEX_GOEP_20_CAPABLE_PROFILE_ENABLED
#define CSR_BT_INSTALL_UTIL_UCS2
#ifndef EXCLUDE_CSR_BT_OPS_MODULE_OPTIONAL 
#define CSR_BT_INSTALL_OBEX_UTIL_SERV_PUT_GET_WITH_HEADER_EXT
#define CSR_BT_INSTALL_OBEX_HEADER_DESCRIPTION
#define CSR_BT_INSTALL_OPS_GET /* Mandetory OPS feature - If this is not defined an 
                                 OPC-get req will recieve a NOT_FOUND response. */
#endif
#endif

#ifndef EXCLUDE_CSR_BT_BIPC_MODULE 
#define CSR_BT_INSTALL_RFC_MODULE
#define CSR_BT_INSTALL_OBEX_UTIL
#define CSR_BT_OBEX_GOEP_20_CAPABLE_PROFILE_ENABLED
#define CSR_BT_INSTALL_OBEX_CLI_GET
#define CSR_BT_INSTALL_OBEX_SRV_GET
#define CSR_BT_INSTALL_OBEX_CONTEXT_ID
#define CSR_BT_INSTALL_OBEX_UTIL_XML /* Only used by BIP/BPP APP */
#define CSR_BT_INSTALL_OBEX_UTIL_IMG_OFFSET /* BIPC & BIPS only */
#define CSR_BT_INSTALL_OBEX_UTIL_COPY_IMAGE /* BIPC only */
#define CSR_BT_INSTALL_UTIL_UCS2
#define CSR_BT_INSTALL_OBEX_UTIL_BODY_OFFSET /* BIPC & BPPS only */
#define CSR_BT_INSTALL_OBEX_UTIL_SERV_PUT_GET_WITH_HEADER_EXT
#define CSR_BT_INSTALL_OBEX_STRING_DESCRIPTION /* BIP app only */
#define CSR_BT_INSTALL_OBEX_HEADER_AUTH_CHALLENGE
#define CSR_BT_INSTALL_OBEX_HEADER_AUTH_RESPONSE
#define CSR_BT_INSTALL_OBEX_HEADER_USER_DEFINE
#define CSR_BT_INSTALL_OBEX_HEADER_APP_PARAMS
#define CSR_BT_INSTALL_OBEX_CLI_HEADER_TARGET_WHO_CID
#endif


#ifndef EXCLUDE_CSR_BT_BIPS_MODULE 
#define CSR_BT_INSTALL_RFC_MODULE
#define CSR_BT_INSTALL_OBEX_UTIL
#define CSR_BT_OBEX_GOEP_20_CAPABLE_PROFILE_ENABLED
#define CSR_BT_INSTALL_OBEX_SRV_GET
#define CSR_BT_INSTALL_OBEX_CLI_GET 
#define CSR_BT_INSTALL_OBEX_CONTEXT_ID
#define CSR_BT_INSTALL_OBEX_UTIL_XML /* Only used by BIP/BPP APP */
#define CSR_BT_INSTALL_OBEX_UTIL_IMG_OFFSET /* BIPC & BIPS only */
#define CSR_BT_INSTALL_OBEX_UTIL_SERV_PUT_GET_WITH_HEADER_EXT
#define CSR_BT_INSTALL_OBEX_STRING_DESCRIPTION /* BIP app only */
#define CSR_BT_INSTALL_OBEX_SRV_HEADER_TARGET_WHO_CID
#define CSR_BT_INSTALL_OBEX_HEADER_AUTH_CHALLENGE
#define CSR_BT_INSTALL_OBEX_HEADER_AUTH_RESPONSE
#define CSR_BT_INSTALL_OBEX_HEADER_USER_DEFINE
#define CSR_BT_INSTALL_OBEX_HEADER_APP_PARAMS
#define CSR_BT_INSTALL_OBEX_UTIL_SERV_NON_CONNECTABLE
#endif


#ifndef EXCLUDE_CSR_BT_BPPS_MODULE 
#define CSR_BT_INSTALL_RFC_MODULE
#define CSR_BT_INSTALL_OBEX_UTIL
#define CSR_BT_INSTALL_OBEX_SRV_GET
#define CSR_BT_INSTALL_OBEX_CONTEXT_ID
#define CSR_BT_INSTALL_OBEX_UTIL_XML /* Only used by BIP/BPP APP */
#define CSR_BT_INSTALL_OBEX_UTIL_BODY_OFFSET /* BIPC & BPPS only */
#define CSR_BT_INSTALL_OBEX_SRV_HEADER_TARGET_WHO_CID
#define CSR_BT_INSTALL_OBEX_HEADER_APP_PARAMS
#define CSR_BT_INSTALL_UTIL_UCS2
#define CSR_BT_INSTALL_OBEX_UTIL_SERV_NON_CONNECTABLE
#define CSR_BT_INSTALL_OBEX_UTIL_SERV_PUT_GET_WITH_HEADER_EXT
#ifndef EXCLUDE_CSR_BT_BPPS_MODULE_OPTIONAL
#define CSR_BT_INSTALL_OBEX_CLI_GET /* Optional*/
#define CSR_BT_INSTALL_OBEX_HEADER_DESCRIPTION
#define CSR_BT_INSTALL_OBEX_HEADER_AUTH_CHALLENGE
#define CSR_BT_INSTALL_OBEX_HEADER_AUTH_RESPONSE
#endif
#endif


#ifndef EXCLUDE_CSR_BT_BPPC_MODULE 
#define CSR_BT_INSTALL_RFC_MODULE
#define CSR_BT_INSTALL_OBEX_UTIL
#define CSR_BT_INSTALL_OBEX_UTIL_XML /* Only used by BIP/BPP APP */
#define CSR_BT_INSTALL_OBEX_CONTEXT_ID
#define CSR_BT_INSTALL_OBEX_SRV_GET
#define CSR_BT_INSTALL_OBEX_CLI_HEADER_TARGET_WHO_CID
#define CSR_BT_INSTALL_OBEX_HEADER_AUTH_CHALLENGE
#define CSR_BT_INSTALL_OBEX_HEADER_AUTH_RESPONSE
#define CSR_BT_INSTALL_UTIL_UCS2
#define CSR_BT_INSTALL_OBEX_UTIL_SERV_NON_CONNECTABLE
#define CSR_BT_INSTALL_OBEX_UTIL_SERV_PUT_GET_WITH_HEADER_EXT
#ifndef EXCLUDE_CSR_BT_BPPC_MODULE_OPTIONAL
#define CSR_BT_INSTALL_OBEX_CLI_GET /* Optional*/
#define CSR_BT_INSTALL_OBEX_HEADER_DESCRIPTION
#define CSR_BT_INSTALL_OBEX_HEADER_APP_PARAMS
#endif
#endif


#ifndef EXCLUDE_CSR_BT_FTC_MODULE 
#define CSR_BT_INSTALL_RFC_MODULE
#define CSR_BT_OBEX_GOEP_20_CAPABLE_PROFILE_ENABLED
#define CSR_BT_INSTALL_OBEX_CLI_SET_PATH
#define CSR_BT_INSTALL_OBEX_CLI_GET
#define CSR_BT_INSTALL_OBEX_CLI_HEADER_TARGET_WHO_CID
#define CSR_BT_INSTALL_OBEX_HEADER_AUTH_CHALLENGE
#define CSR_BT_INSTALL_OBEX_HEADER_AUTH_RESPONSE
#ifndef EXCLUDE_CSR_BT_FTC_MODULE_OPTIONAL
#define CSR_BT_INSTALL_OBEX_HEADER_DESCRIPTION
#endif
#endif

#ifndef EXCLUDE_CSR_BT_FTS_MODULE 
#define CSR_BT_INSTALL_RFC_MODULE
#define CSR_BT_OBEX_GOEP_20_CAPABLE_PROFILE_ENABLED
#define CSR_BT_INSTALL_OBEX_SRV_GET
#define CSR_BT_INSTALL_OBEX_SRV_SET_PATH
#define CSR_BT_INSTALL_OBEX_SRV_HEADER_TARGET_WHO_CID
#define CSR_BT_INSTALL_OBEX_HEADER_AUTH_CHALLENGE
#define CSR_BT_INSTALL_OBEX_HEADER_AUTH_RESPONSE
#define CSR_BT_INSTALL_OBEX_UTIL_CREATE_NAME
#define CSR_BT_INSTALL_UTIL_UCS2
#define CSR_BT_INSTALL_OBEX_UTIL_SERV_PUT_GET_WITH_HEADER_EXT
#ifndef EXCLUDE_CSR_BT_FTS_MODULE_OPTIONAL
#define CSR_BT_INSTALL_OBEX_HEADER_DESCRIPTION
#endif
#endif


#ifndef EXCLUDE_CSR_BT_PAC_MODULE 
#define CSR_BT_INSTALL_RFC_MODULE
#define CSR_BT_INSTALL_OBEX_UTIL
#define CSR_BT_OBEX_GOEP_20_CAPABLE_PROFILE_ENABLED
#define CSR_BT_INSTALL_OBEX_UTIL_SET_SERVICE_HANDLE_RES
#define CSR_BT_INSTALL_OBEX_CONTEXT_ID
#define CSR_BT_INSTALL_OBEX_HEADER_AUTH_CHALLENGE
#define CSR_BT_INSTALL_OBEX_HEADER_AUTH_RESPONSE
#define CSR_BT_INSTALL_OBEX_HEADER_APP_PARAMS
#define CSR_BT_INSTALL_OBEX_CLI_GET
#define CSR_BT_INSTALL_OBEX_CLI_HEADER_TARGET_WHO_CID
#define CSR_BT_INSTALL_OBEX_CLI_SET_PATH
#define CSR_BT_INSTALL_UTIL_UCS2
#ifndef EXCLUDE_CSR_BT_PAC_MODULE_OPTIONAL
#define INSTALL_PAC_CUSTOM_SECURITY_SETTINGS
#endif
#endif /* !EXCLUDE_CSR_BT_PAC_MODULE */

#ifndef EXCLUDE_CSR_BT_PAS_MODULE 
#define CSR_BT_INSTALL_RFC_MODULE
#define CSR_BT_INSTALL_OBEX_UTIL
#define CSR_BT_OBEX_GOEP_20_CAPABLE_PROFILE_ENABLED
#define CSR_BT_INSTALL_OBEX_CONTEXT_ID
#define CSR_BT_INSTALL_OBEX_HEADER_AUTH_CHALLENGE
#define CSR_BT_INSTALL_OBEX_HEADER_AUTH_RESPONSE
#define CSR_BT_INSTALL_OBEX_HEADER_APP_PARAMS
#define CSR_BT_INSTALL_OBEX_SRV_GET
#define CSR_BT_INSTALL_OBEX_SRV_HEADER_TARGET_WHO_CID
#define CSR_BT_INSTALL_OBEX_UTIL_SERV_PUT_GET_WITH_HEADER_EXT
#define CSR_BT_INSTALL_UTIL_UCS2
#endif


#ifndef EXCLUDE_CSR_BT_SMLC_MODULE 
#define CSR_BT_INSTALL_RFC_MODULE
#define CSR_BT_INSTALL_OBEX_CLI_GET
#define CSR_BT_INSTALL_OBEX_CLI_HEADER_TARGET_WHO_CID
#define CSR_BT_INSTALL_OBEX_HEADER_AUTH_CHALLENGE
#define CSR_BT_INSTALL_OBEX_HEADER_AUTH_RESPONSE
#define CSR_BT_INSTALL_128_BIT_SERVICE_SEARCH
#ifndef EXCLUDE_CSR_BT_SMLC_MODULE_OPTIONAL
#define CSR_BT_INSTALL_OBEX_HEADER_DESCRIPTION
#endif
#endif

#ifndef EXCLUDE_CSR_BT_SMLS_MODULE 
#define CSR_BT_INSTALL_RFC_MODULE
#define CSR_BT_INSTALL_OBEX_SRV_GET
#define CSR_BT_INSTALL_OBEX_SRV_SET_PATH
#define CSR_BT_INSTALL_OBEX_SRV_HEADER_TARGET_WHO_CID
#define CSR_BT_INSTALL_OBEX_HEADER_AUTH_CHALLENGE
#define CSR_BT_INSTALL_OBEX_HEADER_AUTH_RESPONSE
#define CSR_BT_INSTALL_128_BIT_SERVICE_SEARCH
#define CSR_BT_INSTALL_UTIL_UCS2
#define CSR_BT_INSTALL_OBEX_UTIL_SERV_PUT_GET_WITH_HEADER_EXT
#ifndef EXCLUDE_CSR_BT_SMLS_MODULE_OPTIONAL
#define CSR_BT_INSTALL_OBEX_HEADER_DESCRIPTION
#endif
#endif



#ifndef EXCLUDE_CSR_BT_SYNCS_MODULE 
#define CSR_BT_INSTALL_RFC_MODULE
#define CSR_BT_INSTALL_OBEX_UTIL
#define CSR_BT_INSTALL_OBEX_SRV_GET
#define CSR_BT_INSTALL_OBEX_SRV_HEADER_TARGET_WHO_CID
#define CSR_BT_INSTALL_OBEX_HEADER_AUTH_CHALLENGE
#define CSR_BT_INSTALL_OBEX_HEADER_AUTH_RESPONSE
#define CSR_BT_INSTALL_OBEX_HEADER_APP_PARAMS
#define CSR_BT_INSTALL_OBEX_CONTEXT_ID
#define CSR_BT_INSTALL_UTIL_UCS2
#define CSR_BT_INSTALL_OBEX_UTIL_SERV_PUT_GET_WITH_HEADER_EXT
#ifndef EXCLUDE_CSR_BT_SYNCS_MODULE_OPTIONAL
#define CSR_BT_INSTALL_OBEX_HEADER_DESCRIPTION
#endif
#endif
 

#ifndef EXCLUDE_CSR_BT_SYNCC_MODULE 
#define CSR_BT_INSTALL_RFC_MODULE
#define CSR_BT_INSTALL_OBEX_UTIL
#define CSR_BT_INSTALL_OBEX_CLI_GET
#define CSR_BT_INSTALL_OBEX_CLI_HEADER_TARGET_WHO_CID
#define CSR_BT_INSTALL_OBEX_HEADER_AUTH_CHALLENGE
#define CSR_BT_INSTALL_OBEX_HEADER_AUTH_RESPONSE
#define CSR_BT_INSTALL_OBEX_HEADER_DESCRIPTION
#define CSR_BT_INSTALL_OBEX_HEADER_APP_PARAMS
#define CSR_BT_INSTALL_OBEX_CONTEXT_ID
#define CSR_BT_INSTALL_UTIL_UCS2
#ifndef EXCLUDE_CSR_BT_SYNCC_MODULE_OPTIONAL
#define CSR_BT_INSTALL_OBEX_HEADER_DESCRIPTION
#endif
#endif
 

#ifndef EXCLUDE_CSR_BT_MAPC_MODULE 
#define CSR_BT_INSTALL_RFC_MODULE
#define CSR_BT_INSTALL_OBEX_UTIL
#define CSR_BT_OBEX_GOEP_20_CAPABLE_PROFILE_ENABLED
#define CSR_BT_INSTALL_OBEX_UTIL_SET_SERVICE_HANDLE_RES
#define CSR_BT_INSTALL_OBEX_CONTEXT_ID
#define CSR_BT_INSTALL_OBEX_CLI_SET_PATH
#define CSR_BT_INSTALL_OBEX_CLI_GET
#define CSR_BT_INSTALL_OBEX_CLI_HEADER_TARGET_WHO_CID
#define CSR_BT_INSTALL_OBEX_SRV_HEADER_TARGET_WHO_CID
#define CSR_BT_INSTALL_OBEX_HEADER_APP_PARAMS
#define CSR_BT_INSTALL_UTIL_UCS2
#ifndef EXCLUDE_CSR_BT_MAPC_MODULE_OPTIONAL
#define INSTALL_MAPC_CUSTOM_SECURITY_SETTINGS
#if (NUM_MAPC_INST > 1)
#define CSR_BT_INSTALL_MULTI_MAPC_INSTANCE_SUPPORT
#endif
#endif
#endif


#ifndef EXCLUDE_CSR_BT_MAPS_MODULE 
#define CSR_BT_INSTALL_RFC_MODULE
#define CSR_BT_INSTALL_OBEX_UTIL
#define CSR_BT_OBEX_GOEP_20_CAPABLE_PROFILE_ENABLED
#define CSR_BT_INSTALL_OBEX_UTIL_SET_SERVICE_HANDLE_RES
#define CSR_BT_INSTALL_OBEX_CONTEXT_ID
#define CSR_BT_INSTALL_OBEX_SRV_GET
#define CSR_BT_INSTALL_OBEX_SRV_SET_PATH
#define CSR_BT_INSTALL_OBEX_SRV_HEADER_TARGET_WHO_CID
#define CSR_BT_INSTALL_OBEX_HEADER_APP_PARAMS
#define CSR_BT_INSTALL_OBEX_UTIL_SERV_PUT_GET_WITH_HEADER_EXT
#define CSR_BT_INSTALL_UTIL_UCS2
#endif
/* End of OBEX profiles */


#ifndef EXCLUDE_CSR_BT_HCRP_MODULE 
#define CSR_BT_INSTALL_L2CAP_MODULE
#endif


#ifndef EXCLUDE_CSR_BT_HIDD_MODULE 
#define CSR_BT_INSTALL_L2CAP_MODULE
#define INSTALL_CSR_BT_SD_SERVICE_RECORD_MODULE
#ifndef EXCLUDE_CSR_BT_HIDD_MODULE_OPTIONAL
#define INSTALL_HIDD_CUSTOM_SECURITY_SETTINGS
#endif
#endif


#ifndef EXCLUDE_CSR_BT_HIDH_MODULE 
#define CSR_BT_INSTALL_L2CAP_MODULE
#define CSR_BT_INSTALL_SC_ENCRYPTION
#define CSR_BT_INSTALL_CM_WRITE_LINK_SUPERVISION_TIMEOUT
#define INSTALL_CSR_BT_SD_SERVICE_RECORD_MODULE
#endif
 

#ifndef EXCLUDE_CSR_BT_JSR82_MODULE 
#define CSR_BT_INSTALL_L2CAP_MODULE
#define CSR_BT_INSTALL_RFC_MODULE
#define CSR_BT_INSTALL_SC_AUTHENTICATE
#define CSR_BT_INSTALL_SC_ENCRYPTION
/* CM API functions */
#define CSR_BT_INSTALL_CM_READ_LOCAL_NAME
#define CSR_BT_INSTALL_CM_WRITE_COD
#define CSR_BT_INSTALL_CM_READ_COD
#define CSR_BT_INSTALL_CM_READ_SCAN_EANBLE
#define CSR_BT_INSTALL_128_BIT_SERVICE_SEARCH
#define CSR_BT_INSTALL_CM_PRI_IAC
#define CSR_BT_INSTALL_CM_PRI_IAC_READ
#define CSR_BT_INSTALL_CM_PRI_SDC
#define CSR_BT_INSTALL_CM_PRI_CONNECT_EXT
#endif


#ifndef EXCLUDE_CSR_BT_SAPC_MODULE 
#define CSR_BT_INSTALL_RFC_MODULE
#endif


#ifndef EXCLUDE_CSR_BT_SAPS_MODULE 
#define CSR_BT_INSTALL_RFC_MODULE
#endif



#ifndef EXCLUDE_CSR_BT_SPP_MODULE
/* Remove below exclusion of SPP extended activate, to use extended activate API i.e. CsrBtSppActivateReqSendExt
   to activate SPP with custom SDP record, without enabling other SPP optional features */
#define EXCLUDE_CSR_BT_SPP_EXTENDED_ACTIVATE_REQ
#define CSR_BT_INSTALL_RFC_MODULE
#define INSTALL_SPP_MODEM_STATUS_COMMAND
#define INSTALL_SPP_OUTGOING_CONNECTION
#ifndef EXCLUDE_CSR_BT_SPP_MODULE_OPTIONAL
#define INSTALL_SPP_REMOTE_PORT_NEGOTIATION
#define INSTALL_SPP_CUSTOM_SECURITY_SETTINGS
#ifndef CSR_USE_QCA_CHIP
#define CSR_BT_INSTALL_SPP_EXTENDED
#undef EXCLUDE_CSR_BT_SPP_EXTENDED_ACTIVATE_REQ
#endif /* !CSR_USE_QCA_CHIP */
#endif /* !EXCLUDE_CSR_BT_SPP_MODULE_OPTIONAL */
#if defined(CSR_BT_INSTALL_SPP_EXTENDED) || !defined(EXCLUDE_CSR_BT_SPP_EXTENDED_ACTIVATE_REQ)
#define INSTALL_SPP_CUSTOM_SECURITY_SETTINGS
#endif
#endif /* !EXCLUDE_CSR_BT_SPP_MODULE */

#ifndef EXCLUDE_CSR_BT_GNSS_CLIENT_MODULE
#define CSR_BT_INSTALL_RFC_MODULE
#endif

#ifndef EXCLUDE_CSR_BT_GNSS_SERVER_MODULE
#define CSR_BT_INSTALL_RFC_MODULE
#endif

#if defined (CSR_TARGET_PRODUCT_WEARABLE)
#define CSR_BT_INSTALL_RFC_MODULE
#endif

#ifndef EXCLUDE_CSR_BT_PHDC_AG_MODULE 
#define CSR_BT_INSTALL_MDER_MODULE
#endif


#ifndef EXCLUDE_CSR_BT_PHDC_MGR_MODULE 
#define CSR_BT_INSTALL_MDER_MODULE
#endif

#ifndef EXCLUDE_CSR_BT_HDP_MODULE 
#define CSR_BT_INSTALL_L2CAP_MODULE
#define CSR_BT_INSTALL_CM_PRI_L2CA_UNREGISTER
#define INSTALL_CSR_BT_SD_SERVICE_RECORD_MODULE
#endif


#ifndef EXCLUDE_CSR_BT_MCAP_MODULE 
#define CSR_BT_INSTALL_L2CAP_MODULE
#else
#define EXCLUDE_CSR_BT_MCAP_PRIVATE_MODULE 
#endif


#ifndef EXCLUDE_CSR_BT_BSL_MODULE
#define INSTALL_PAN_MODULE
#define CSR_BT_INSTALL_BSL_MODULE
#endif

#ifndef EXCLUDE_CSR_BT_SC_MODULE_OPTIONAL
#define CSR_BT_INSTALL_SC_AUTHENTICATE
#define CSR_BT_INSTALL_SC_ENCRYPTION
#define CSR_BT_INSTALL_SC_OOB
#define CSR_BT_INSTALL_SC_DEBUG_MODE
#define CSR_BT_INSTALL_SC_SET_EVENT_MASK
#define CSR_BT_INSTALL_SC_SET_IO_CAPABILITY
#define CSR_BT_INSTALL_SC_SET_AUTH_REQUIREMENTS
#define CSR_BT_INSTALL_SC_MODE
#define CSR_BT_INSTALL_SC_SECURITY_MODE
#define CSR_BT_INSTALL_SC_LE_KEY_DISTRIBUTION
#define CSR_BT_INSTALL_SC_TRUST_LEVEL
#define CSR_BT_INSTALL_SC_CONFIG_MASK
#define CSR_BT_INSTALL_SC_EVENT_MASK_SUBSCRIBE_ADDRESS_MAPPED_IND
#endif

#ifndef EXCLUDE_CSR_BT_SD_MODULE_OPTIONAL
#define CSR_BT_INSTALL_SD_SEARCH_CONFIG
#define CSR_BT_INSTALL_SD_MEMORY_CONFIG
#define INSTALL_CSR_BT_SD_SERVICE_RECORD_MODULE
#endif

#ifndef EXCLUDE_CSR_BT_CM_MODULE_OPTIONAL
#define CSR_BT_INSTALL_CM_CACHE_PARAMS
#define CSR_BT_INSTALL_CM_READ_LOCAL_NAME
#define CSR_BT_INSTALL_CM_WRITE_LINK_SUPERVISION_TIMEOUT
#define CSR_BT_INSTALL_CM_READ_TX_POWER_LEVEL
#define CSR_BT_INSTALL_CM_GET_LINK_QUALITY
#define CSR_BT_INSTALL_CM_READ_RSSI
#define CSR_BT_INSTALL_CM_WRITE_COD
#define CSR_BT_INSTALL_CM_PRI_IAC
#define CSR_BT_INSTALL_CM_PRI_IAC_READ
#define CSR_BT_INSTALL_CM_READ_COD
#define CSR_BT_INSTALL_CM_READ_SCAN_EANBLE
#define CSR_BT_INSTALL_128_BIT_SERVICE_SEARCH
#define CSR_BT_INSTALL_CM_AUTO_SCAN_ENABLE
#define CSR_BT_INSTALL_CM_AUTO_UPDATE_COD
#define CSR_BT_INSTALL_CM_WRITE_PAGE_TO
#define CSR_BT_INSTALL_CM_WRITE_PAGE_SCAN
#define CSR_BT_INSTALL_CM_WRITE_INQUIRY_SCAN_TYPE
#define CSR_BT_INSTALL_CM_READ_LOCAL_EXT_FEATURES
#define CSR_BT_INSTALL_CM_AFH
#define CSR_BT_INSTALL_CM_READ_CLOCK
#define CSR_BT_INSTALL_CM_LINK_POLICY
#define CSR_BT_INSTALL_CM_EIR_FLAGS
#define CSR_BT_INSTALL_CM_INTERNAL_LP_CONTROL
#define CSR_BT_INSTALL_CM_INTERNAL_ROLE_CONTROL
#define CSR_BT_INSTALL_CM_READ_LP
#define CSR_BT_INSTALL_CM_ROLE_SWITCH_CONFIG
#define CSR_BT_INSTALL_CM_READ_FAILED_CONTACT_COUNTER
#define CSR_BT_INSTALL_CM_SWITCH_ROLE_PUBLIC
#define CSR_BT_INSTALL_CM_LOW_POWER_CONFIG_PUBLIC
#define CSR_BT_INSTALL_CM_EVENT_MASK_SUBSCRIBE_BLUECORE_INITIALIZED
#define CSR_BT_INSTALL_CM_EVENT_MASK_SUBSCRIBE_ACL_CONNECTION
#define CSR_BT_INSTALL_CM_EVENT_MASK_SUBSCRIBE_SYNCHRONOUS_CONNECTION
#define CSR_BT_INSTALL_CM_EVENT_MASK_SUBSCRIBE_ROLE_CHANGE
#define CSR_BT_INSTALL_CM_EVENT_MASK_SUBSCRIBE_MODE_CHANGE
#define CSR_BT_INSTALL_CM_EVENT_MASK_SUBSCRIBE_LSTO_CHANGE
#define CSR_BT_INSTALL_CM_EVENT_MASK_SUBSCRIBE_CHANNEL_TYPE
#define CSR_BT_INSTALL_CM_EVENT_MASK_SUBSCRIBE_EXT_SYNC_CONNECTION
#define CSR_BT_INSTALL_CM_EVENT_MASK_SUBSCRIBE_REMOTE_FEATURES
#define CSR_BT_INSTALL_CM_EVENT_MASK_SUBSCRIBE_REMOTE_VERSION
#define CSR_BT_INSTALL_CM_EVENT_MASK_SUBSCRIBE_A2DP_BIT_RATE
#define CSR_BT_INSTALL_CM_EVENT_MASK_SUBSCRIBE_INQUIRY_PAGE_STATE
#define CSR_BT_INSTALL_CM_EVENT_MASK_SUBSCRIBE_LOW_ENERGY
#define CSR_BT_INSTALL_CM_EVENT_MASK_SUBSCRIBE_ENCRYPT_CHANGE
#define CSR_BT_INSTALL_CM_EVENT_MASK_SUBSCRIBE_LOCAL_NAME_CHANGE
#define CSR_BT_INSTALL_CM_EVENT_MASK_SUBSCRIBE_HIGH_PRIORITY_DATA
#define CSR_BT_INSTALL_CM_EVENT_MASK_SUBSCRIBE_BLUECORE_DEINITIALIZED
#define INSTALL_CM_REMOTE_EXT_FEATURES
#define INSTALL_CM_LE_PHY_UPDATE_FEATURE
/* CM Initialization optional step flags. */
#define CM_INIT_BLUECORE_TRANSPORT
#define CM_INIT_READ_LOCAL_VERSION
#define CM_INIT_READ_LOCAL_FEATURES
#define CM_INIT_WRITE_PAGE_TO
#define CM_INIT_LE_READ_LOCAL_SUPP_FEATURES
#define CM_INIT_WRITE_PAGESCAN_ACTIVITY
#define CM_INIT_WRITE_INQUIRY_SCAN_TYPE
#define CM_INIT_WRITE_INQUIRY_MODE
#define CM_INIT_WRITE_INQUIRYSCAN_ACTIVITY
#define CM_INIT_SET_BT_VERSION
#define CM_INIT_WRITE_PAGE_SCAN_TYPE
#define CM_INIT_LP_WRITE_ROLESWITCH_POLICY_REQ
#define CM_INIT_SET_DEFAULT_LINK_POLICY_REQ
#define CM_INIT_SM_INIT_REQ
#define CM_INIT_WRITE_VOICE_SETTING
#define CM_INIT_CLASS_OF_DEVICE
#define CM_INIT_SCAN

/* CM_Private */
#define CSR_BT_INSTALL_CM_WRITE_VOICE_SETTINGS
#define CSR_BT_INSTALL_CM_PRI_SDC
#define CSR_BT_INSTALL_CM_PRI_ALWAYS_SUPPORT_MASTER_ROLE
#define CSR_BT_INSTALL_CM_PRI_CANCEL_RFC_EXTENDED_SEARCH
#define CSR_BT_INSTALL_CM_PRI_CONNECT_EXT
#define CSR_BT_INSTALL_CM_PRI_SCO_RENEGOTIATE
#define CSR_BT_INSTALL_CM_PRI_MODE_SETTINGS
#define CSR_BT_INSTALL_CM_PRI_L2CA_UNREGISTER
#define CSR_BT_INSTALL_CM_PRI_L2CA_DATA_ABORT
#define CSR_BT_INSTALL_CM_PRI_SET_EVENT_FILTER_BDADDR
#define CSR_BT_INSTALL_CM_OOB
#define CSR_BT_INSTALL_CM_SC_MODE_CONFIG
#define INSTALL_CM_CLEAR_EVENT_FILTER
#define INSTALL_CM_SET_EVENT_FILTER_COD
#define INSTALL_CM_INQUIRY
#define INSTALL_CM_SM_REPAIR
#endif /* EXCLUDE_CSR_BT_CM_MODULE_OPTIONAL */

/* CM writes 'class of device' and enables inquiry/page scan if profiles send
 * 'connect accept' request.
 * This feature is not required on V&M platforms */
#define CSR_BT_INSTALL_CM_AUTO_SCAN_ENABLE

#if CSR_BT_BT_VERSION >= CSR_BT_BLUETOOTH_VERSION_2P1
#define CSR_BT_INSTALL_CM_AUTO_EIR
#endif

#ifdef CSR_BT_HFG_INCLUDE_SWB_SUPPORT
#define CSR_BT_HFG_ENABLE_SWB_SUPPORT
#endif

#ifndef CSR_BT_INSTALL_CM_HANDLE_REGISTER
#define CSR_BT_INSTALL_CM_HANDLE_REGISTER
#endif

#if defined(CSR_BT_INSTALL_SC_DEBUG_MODE) || defined(CSR_BT_INSTALL_SC_CONFIG_MASK)
#define CSR_BT_INSTALL_CM_SC_MODE_CONFIG
#endif

#ifdef CSR_BT_INSTALL_SC_OOB
#define CSR_BT_INSTALL_CM_OOB
#endif

/* If application does not write class of device, update it autonomously */
#ifndef CSR_BT_INSTALL_CM_WRITE_COD
#define CSR_BT_INSTALL_CM_AUTO_UPDATE_COD
#endif

#ifndef CSR_BT_INSTALL_CM_OOB
#define CSR_BT_EXCLUDE_SM_READ_LOCAL_OOB_DATA
#endif

#ifndef CSR_BT_INSTALL_CM_READ_LOCAL_NAME
#define EXCLUDE_CSR_BT_CM_READ_LOCAL_NAME_REQ
#define EXCLUDE_CSR_BT_CM_READ_LOCAL_NAME_CFM
#endif

#ifdef CSR_BT_INSTALL_INTERNAL_APP_DEPENDENCIES
/* If this flag is set, the code needed by internal 
   CSR-applications will be included. */
#define CSR_BT_INSTALL_CM_WRITE_COD /* Used by GAP demo app */
#define CSR_BT_INSTALL_CM_PRI_CONNECT_EXT /* Used by RFC test demo app */

#ifdef CSR_BT_LE_ENABLE
#define CSR_BT_INSTALL_CM_READ_RSSI /* Used by GATT Proximity demo app */
#endif

#define CSR_BT_INSTALL_SD_SEARCH_CONFIG /* Used by PAN demo app */

/* Used by SC demo app */
#define CSR_BT_INSTALL_SC_SET_EVENT_MASK
#define CSR_BT_INSTALL_SC_SET_IO_CAPABILITY
#define CSR_BT_INSTALL_SC_SET_AUTH_REQUIREMENTS
#define CSR_BT_INSTALL_SC_LE_KEY_DISTRIBUTION
#ifndef CSR_TARGET_PRODUCT_WEARABLE
#define CSR_BT_INSTALL_SC_SECURITY_MODE
#endif
#define CSR_BT_INSTALL_SC_EVENT_MASK_SUBSCRIBE_ADDRESS_MAPPED_IND
#define CSR_BT_INSTALL_UTIL_UCS2

#endif /* CSR_BT_INSTALL_INTERNAL_APP_DEPENDENCIES */

#ifdef CSR_BT_INSTALL_INTERNAL_TEST_DEPENDENCIES
/* If this flag is set, the code needed by internal
   CSR tests will be included. */

#define CSR_BT_INSTALL_CM_READ_SCAN_EANBLE /* Used by several tester/tester groups */
#define CSR_BT_INSTALL_CM_LINK_POLICY /* Used by 1 tester/tester test case but several CM module tests */
#define CSR_BT_INSTALL_CM_READ_CLOCK /* Used by 1 tester/tester test case and profile_managers_development/test_app/app_files/csr_bt_test_app_mcap.c */
#define CSR_BT_INSTALL_CM_ROLE_SWITCH_CONFIG /* Used by 1 tester/tester test case and 1 CM module test case */
#define CSR_BT_INSTALL_CM_PRI_ALWAYS_SUPPORT_MASTER_ROLE /* Used by a few cm tester/tester test cases and throughput */
#define CSR_BT_INSTALL_CM_PRI_CANCEL_RFC_EXTENDED_SEARCH /* Used by a few tester/tester test cases */
#define CSR_BT_INSTALL_CM_PRI_SDC /* Used by a few tester/tester test cases and 1 CM module test case */
#define CSR_BT_INSTALL_CM_PRI_L2CA_CONNECT_CONFTAB /* Used by a few tester/tester test cases */
#ifndef EXCLUDE_CSR_BT_SC_MODULE
#define CSR_BT_INSTALL_SC_SECURITY_MODE /* This is needed to run the sc-group in tester, since all test cases sends the request. */
#endif
#define CSR_BT_INSTALL_OPTIONAL_UTIL /* Used by more or less all tester/tester test cases */
#define CSR_BT_INSTALL_CM_READ_RSSI /* Used by the generic test step testCaseWaitAclClosedInd() */

/* Low risk */
#define CSR_BT_INSTALL_SD_SEARCH_CONFIG
#define CSR_BT_INSTALL_SD_MEMORY_CONFIG

#define CSR_BT_INSTALL_HF_CONFIG_AUDIO
#define CSR_BT_INSTALL_HFG_CONFIG_AUDIO

#define CSR_BT_INSTALL_SC_SET_EVENT_MASK
#define CSR_BT_INSTALL_SC_SET_IO_CAPABILITY
#define CSR_BT_INSTALL_SC_SET_AUTH_REQUIREMENTS
#define CSR_BT_INSTALL_SC_LE_KEY_DISTRIBUTION
#define CSR_BT_INSTALL_SC_EVENT_MASK_SUBSCRIBE_ADDRESS_MAPPED_IND
#define CSR_BT_INSTALL_UTIL_UCS2

#else /* CSR_BT_INSTALL_INTERNAL_TEST_DEPENDENCIES */
/* Used for spec. test */
#define CSR_BT_EXCLUDE_HCI_CHANGE_CONN_LINK_KEY
#define CSR_BT_EXCLUDE_HCI_HOLD_MODE

#endif /* CSR_BT_INSTALL_INTERNAL_TEST_DEPENDENCIES */

#ifndef EXCLUDE_CSR_BT_DUT_MODULE
#define CSR_BT_INSTALL_CM_DUT_MODE
#else
#define CSR_BT_EXCLUDE_HCI_ENABLE_DUT_MODE
#endif

#ifdef CSR_BT_INSTALL_SPP_EXTENDED
#define CSR_BT_INSTALL_128_BIT_SERVICE_SEARCH
#define CSR_BT_INSTALL_CM_PRI_SCO_RENEGOTIATE
#endif

/* Convert to low-level EXCLUDE_FLAG 
TODO: CSR_BT_BT_VERSION is defined in csr_bt_usr_config.h, but it cannot be included
      in this file, since it includes other headers, which depend on this file... 
      One solution would be to move the include of the file to the bottom of this file
#ifndef CSR_BT_INSTALL_CM_READ_LOCAL_NAME
#if CSR_BT_BT_VERSION < CSR_BT_BLUETOOTH_VERSION_2P1
#define CSR_BT_EXCLUDE_HCI_READ_LOCAL_NAME
#endif
#endif
#if CSR_BT_BT_VERSION < CSR_BT_BLUETOOTH_VERSION_2P1
#define CSR_BT_EXCLUDE_HCI_WRITE_EXTENDED_INQUIRY_RESPONSE_DATA
#endif
*/



/* ---------- Cross Profile dependent flags ---------- */
#ifdef CSR_BT_OBEX_GOEP_20_CAPABLE_PROFILE_ENABLED
#ifndef EXCLUDE_CSR_BT_L2CA_MODULE
#ifndef EXCLUDE_CSR_BT_GOEP_20_MODULE
/* Only do this if an OBEX 20 cabacle profile is enabled */
#define CSR_BT_INSTALL_L2CAP_MODULE 
#define CSR_BT_INSTALL_OBEX_GOEP_20
#define CSR_BT_INSTALL_CM_PRI_L2CA_UNREGISTER
#define CSR_BT_INSTALL_CM_PRI_L2CA_CONNECT_CONFTAB
#define CSR_BT_INSTALL_CM_PRI_L2CA_DATA_ABORT
#endif
#endif
#endif

#ifndef EXCLUDE_CSR_EXCEPTION_HANDLER_MODULE
#define CSR_BT_INSTALL_OBEX_ERROR_CHECK
#endif


/* ---------- Ensure we have backwards compatibility ---------- */
#ifndef EXCLUDE_CSR_BT_OPTIONAL_UTILS 
#define CSR_BT_INSTALL_UTIL_UCS2
#define CSR_BT_INSTALL_OPTIONAL_UTIL
#define CSR_BT_INSTALL_OBEX_UTIL_XML
#define CSR_BT_INSTALL_OBEX_UTIL_SET_SERVICE_HANDLE_RES
#define CSR_BT_INSTALL_OBEX_UTIL_SERV_NON_CONNECTABLE
#define CSR_BT_INSTALL_OBEX_UTIL_SERV_PUT_GET_WITH_HEADER_EXT
#else
#if defined(EXCLUDE_CSR_BT_BSL_MODULE) && defined(EXCLUDE_CSR_BT_DUNC_MODULE) && !defined(CSR_BT_INSTALL_INTERNAL_TEST_DEPENDENCIES) && !defined(CSR_BT_INSTALL_INTERNAL_APP_DEPENDENCIES)
#define EXCLUDE_CSR_BT_UDP_MODULE
#define EXCLUDE_CSR_BT_LSL_MODULE
#define EXCLUDE_CSR_BT_IP_MODULE
#define EXCLUDE_CSR_BT_ICMP_MODULE
#define EXCLUDE_CSR_BT_DHCP_MODULE
#define EXCLUDE_CSR_BT_PPP_MODULE
#endif
#endif

/* ---------- Test functionality ---------- */
#ifndef EXCLUDE_CSR_BT_TPT_MODULE
#define CSR_BT_INSTALL_AV_SET_QOS_INTERVAL
/* REQ SPP */
#endif

/* ---------- Resolve install-flags dependencies ---------- */
#ifdef CSR_BT_INSTALL_OBEX_CLI_GET
#define CSR_BT_INSTALL_OBEX_UTIL_BODY_OFFSET 
#endif

#ifndef INSTALL_CSR_BT_SD_SERVICE_RECORD_MODULE
#ifndef EXCLUDE_CSR_BT_SD_SERVICE_RECORD_MODULE
#define EXCLUDE_CSR_BT_SD_SERVICE_RECORD_MODULE
#endif
#endif

#ifdef CSR_BT_INSTALL_RFC_MODULE
#define CSR_BT_INSTALL_L2CAP_MODULE
#endif

/* ---------- Convert install-flags to legacy exclude-flags ---------- */

#ifndef CSR_BT_INSTALL_L2CAP_MODULE
#undef EXCLUDE_CSR_BT_L2CA_MODULE
#define EXCLUDE_CSR_BT_L2CA_MODULE
#endif

#ifndef CSR_BT_INSTALL_RFC_MODULE
#undef EXCLUDE_CSR_BT_RFC_MODULE
#define EXCLUDE_CSR_BT_RFC_MODULE
#endif

#ifndef CSR_BT_INSTALL_BSL_MODULE
#undef EXCLUDE_CSR_BT_BNEP_MODULE 
#define EXCLUDE_CSR_BT_BNEP_MODULE 
#endif

#ifndef CSR_BT_INSTALL_MDER_MODULE
#undef EXCLUDE_CSR_BT_MDER_MODULE 
#define EXCLUDE_CSR_BT_MDER_MODULE 
#endif

/* DM_SYNC (SCO) mandatory settings */
#ifndef CSR_BT_INSTALL_SCO_MODULE
#undef EXCLUDE_CSR_BT_SCO_MODULE
#define EXCLUDE_CSR_BT_SCO_MODULE
#undef INSTALL_DM_SYNC_MODULE
#undef CSR_BT_MAX_NUM_SCO_CONNS /* This will not work, as csr_bt_user_config.h is included after this file is included */
#define CSR_BT_EXCLUDE_SYNC_CONNECT
#define CSR_BT_EXCLUDE_SYNC_DISCONNECT
#define CSR_BT_EXCLUDE_SYNC_REGISTER
#define CSR_BT_EXCLUDE_SYNC_RENEGOTIATE
#define CSR_BT_EXCLUDE_SYNC_UNREGISTER
#else
#define INSTALL_DM_SYNC_MODULE
#endif

/* DM mandatory settings */
#ifndef INSTALL_BUILD_FOR_HOST_DM_ACL_CON_START_IND
#define INSTALL_BUILD_FOR_HOST_DM_ACL_CON_START_IND
#endif

#ifndef BUILD_FOR_HOST_OLD_LINK_KEY_API
#define BUILD_FOR_HOST_OLD_LINK_KEY_API
#endif

/* RFCOMM mandatory settings */
#ifndef EXCLUDE_CSR_BT_RFC_MODULE
#undef INSTALL_RFCOMM_MODULE
#define INSTALL_RFCOMM_MODULE
#define RFCOMM_MULTI_THREAD
#endif /* EXCLUDE_CSR_BT_RFC_MODULE */


#ifdef INSTALL_IBFP
#undef CSR_IBFP_H4I_SUPPORT
#define CSR_IBFP_H4I_SUPPORT

#undef CSR_H4I_ENABLE_PATCH
#define CSR_H4I_ENABLE_PATCH

#undef CSR_BT_INSTALL_CHANGE_ACL_PACKET_TYPE
#define CSR_BT_INSTALL_CHANGE_ACL_PACKET_TYPE

#undef INSTALL_BUILD_FOR_HOST_NO_OVERRIDE_HCI_CMD_FC
#define INSTALL_BUILD_FOR_HOST_NO_OVERRIDE_HCI_CMD_FC

#ifdef CSR_BT_LE_ENABLE
#undef SUPPORT_SEPARATE_LE_BUFFERS 
#define SUPPORT_SEPARATE_LE_BUFFERS 
#endif
#endif

#ifdef CSR_USE_QCA_CHIP
#ifdef CSR_BT_LE_ENABLE
#undef SUPPORT_SEPARATE_LE_BUFFERS 
#define SUPPORT_SEPARATE_LE_BUFFERS
#endif
#endif

/* Exclude converter functions for specific primitives */
#ifndef CSR_BT_INSTALL_SC_SET_EVENT_MASK
#define EXCLUDE_CSR_BT_SC_SET_EVENT_MASK_REQ
#endif

#ifndef CSR_BT_INSTALL_SC_SET_IO_CAPABILITY
#define EXCLUDE_CSR_BT_SC_SET_IO_CAPABILITY_REQ
#endif

#ifndef CSR_BT_INSTALL_SC_SET_AUTH_REQUIREMENTS
#define EXCLUDE_CSR_BT_SC_SET_AUTH_REQUIREMENTS_REQ
#endif

#ifndef CSR_BT_INSTALL_SC_MODE
#define EXCLUDE_CSR_BT_SC_MODE_REQ
#define EXCLUDE_CSR_BT_SC_MODE_IND
#endif

#ifndef CSR_BT_INSTALL_SC_LE_KEY_DISTRIBUTION
#define EXCLUDE_CSR_BT_SC_LE_KEY_DISTRIBUTION_REQ
#endif

#ifndef CSR_BT_INSTALL_SC_EVENT_MASK_SUBSCRIBE_ADDRESS_MAPPED_IND
#define CSR_BT_INSTALL_SC_EVENT_MASK_SUBSCRIBE_ADDRESS_MAPPED_IND
#endif

#ifndef CSR_BT_INSTALL_AV_SET_QOS_INTERVAL
#define EXCLUDE_CSR_BT_AV_SET_QOS_INTERVAL_REQ
#endif

#ifndef CSR_BT_INSTALL_SD_SEARCH_CONFIG
#define EXCLUDE_CSR_BT_SD_SEARCH_CONFIG_REQ
#define EXCLUDE_CSR_BT_SD_SEARCH_CONFIG_CFM
#endif

#ifndef CSR_BT_INSTALL_CM_WRITE_VOICE_SETTINGS
#define EXCLUDE_CSR_BT_CM_WRITE_VOICE_SETTINGS_REQ
#define EXCLUDE_CSR_BT_CM_WRITE_VOICE_SETTINGS_CFM
#endif

#ifndef CSR_BT_INSTALL_HF_CONFIG_AUDIO
#define EXCLUDE_CSR_BT_HF_CONFIG_AUDIO_REQ
#define EXCLUDE_CSR_BT_HF_CONFIG_AUDIO_CFM
#endif

#ifndef CSR_BT_INSTALL_HFG_CONFIG_AUDIO
#define EXCLUDE_CSR_BT_HFG_CONFIG_AUDIO_REQ
#endif
#ifndef CSR_BT_INSTALL_HFG_CONFIG_SINGLE_ATCMD
#define EXCLUDE_CSR_BT_HFG_CONFIG_SINGLE_ATCMD_REQ
#define EXCLUDE_CSR_BT_HFG_CONFIG_SINGLE_ATCMD_CFM
#endif
#ifndef CSR_BT_INSTALL_HFG_CONFIG_ATCMD_HANDLING
#define EXCLUDE_CSR_BT_HFG_CONFIG_ATCMD_HANDLING_REQ
#define EXCLUDE_CSR_BT_HFG_CONFIG_ATCMD_HANDLING_CFM
#endif

#ifndef CSR_BT_INSTALL_GATT_PARAM_CONNECTION
#define EXCLUDE_CSR_BT_GATT_PARAM_CONNECTION_REQ
#define EXCLUDE_CSR_BT_GATT_PARAM_CONNECTION_CFM
#endif

#ifndef CSR_BT_INSTALL_AVRCP_CT_13_AND_HIGHER
#define EXCLUDE_CSR_BT_AVRCP_CT_INFORM_DISP_CHARSET_REQ
#define EXCLUDE_CSR_BT_AVRCP_CT_NOTI_REGISTER_REQ
#define EXCLUDE_CSR_BT_AVRCP_CT_PAS_ATT_ID_REQ
#define EXCLUDE_CSR_BT_AVRCP_CT_PAS_VAL_ID_REQ
#define EXCLUDE_CSR_BT_AVRCP_CT_PAS_ATT_TXT_REQ
#define EXCLUDE_CSR_BT_AVRCP_CT_PAS_VAL_TXT_REQ
#define EXCLUDE_CSR_BT_AVRCP_CT_PAS_ATT_TXT_RES
#define EXCLUDE_CSR_BT_AVRCP_CT_PAS_VAL_TXT_RES
#define EXCLUDE_CSR_BT_AVRCP_CT_PAS_CURRENT_REQ
#define EXCLUDE_CSR_BT_AVRCP_CT_PAS_SET_REQ
#define EXCLUDE_CSR_BT_AVRCP_CT_GET_PLAY_STATUS_REQ
#define EXCLUDE_CSR_BT_AVRCP_CT_GET_ATTRIBUTES_REQ
#define EXCLUDE_CSR_BT_AVRCP_CT_GET_ATTRIBUTES_RES
#define EXCLUDE_CSR_BT_AVRCP_CT_GET_FOLDER_ITEMS_REQ
#define EXCLUDE_CSR_BT_AVRCP_CT_PLAY_REQ
#define EXCLUDE_CSR_BT_AVRCP_CT_SEARCH_REQ
#define EXCLUDE_CSR_BT_AVRCP_CT_CHANGE_PATH_REQ
#define EXCLUDE_CSR_BT_AVRCP_CT_SET_VOLUME_REQ
#define EXCLUDE_CSR_BT_AVRCP_CT_SET_ADDRESSED_PLAYER_REQ
#define EXCLUDE_CSR_BT_AVRCP_CT_SET_BROWSED_PLAYER_REQ
#define EXCLUDE_CSR_BT_AVRCP_CT_ADD_TO_NOW_PLAYING_REQ
#define EXCLUDE_CSR_BT_AVRCP_CT_INFORM_BATTERY_STATUS_REQ

#define EXCLUDE_CSR_BT_AVRCP_CT_INFORM_DISP_CHARSET_CFM
#define EXCLUDE_CSR_BT_AVRCP_CT_NOTI_REGISTER_CFM
#define EXCLUDE_CSR_BT_AVRCP_CT_GET_PLAY_STATUS_CFM
#define EXCLUDE_CSR_BT_AVRCP_CT_PAS_ATT_ID_CFM
#define EXCLUDE_CSR_BT_AVRCP_CT_PAS_VAL_ID_CFM
#define EXCLUDE_CSR_BT_AVRCP_CT_PAS_ATT_TXT_CFM
#define EXCLUDE_CSR_BT_AVRCP_CT_PAS_VAL_TXT_CFM
#define EXCLUDE_CSR_BT_AVRCP_CT_PAS_CURRENT_CFM
#define EXCLUDE_CSR_BT_AVRCP_CT_PAS_SET_CFM
#define EXCLUDE_CSR_BT_AVRCP_CT_GET_FOLDER_ITEMS_CFM
#define EXCLUDE_CSR_BT_AVRCP_CT_PLAY_CFM
#define EXCLUDE_CSR_BT_AVRCP_CT_SEARCH_CFM
#define EXCLUDE_CSR_BT_AVRCP_CT_GET_ATTRIBUTES_CFM
#define EXCLUDE_CSR_BT_AVRCP_CT_CHANGE_PATH_CFM
#define EXCLUDE_CSR_BT_AVRCP_CT_SET_VOLUME_CFM
#define EXCLUDE_CSR_BT_AVRCP_CT_SET_ADDRESSED_PLAYER_CFM
#define EXCLUDE_CSR_BT_AVRCP_CT_SET_BROWSED_PLAYER_CFM
#define EXCLUDE_CSR_BT_AVRCP_CT_ADD_TO_NOW_PLAYING_CFM
#define EXCLUDE_CSR_BT_AVRCP_CT_INFORM_BATTERY_STATUS_CFM

#define EXCLUDE_CSR_BT_AVRCP_CT_PAS_ATT_TXT_IND
#define EXCLUDE_CSR_BT_AVRCP_CT_PAS_VAL_TXT_IND
#define EXCLUDE_CSR_BT_AVRCP_CT_PAS_SET_IND
#define EXCLUDE_CSR_BT_AVRCP_CT_NOTI_UIDS_IND
#define EXCLUDE_CSR_BT_AVRCP_CT_NOTI_VOLUME_IND
#define EXCLUDE_CSR_BT_AVRCP_CT_NOTI_BATTERY_STATUS_IND
#define EXCLUDE_CSR_BT_AVRCP_CT_NOTI_PLAYBACK_POS_IND
#define EXCLUDE_CSR_BT_AVRCP_CT_NOTI_SYSTEM_STATUS_IND
#define EXCLUDE_CSR_BT_AVRCP_CT_NOTI_TRACK_CHANGED_IND
#define EXCLUDE_CSR_BT_AVRCP_CT_NOTI_TRACK_END_IND
#define EXCLUDE_CSR_BT_AVRCP_CT_NOTI_TRACK_START_IND
#define EXCLUDE_CSR_BT_AVRCP_CT_NOTI_PLAYBACK_STATUS_IND
#define EXCLUDE_CSR_BT_AVRCP_CT_NOTI_AVAILABLE_PLAYERS_IND
#define EXCLUDE_CSR_BT_AVRCP_CT_NOTI_NOW_PLAYING_IND
#define EXCLUDE_CSR_BT_AVRCP_CT_GET_ATTRIBUTES_IND
#define EXCLUDE_CSR_BT_AVRCP_CT_SET_ADDRESSED_PLAYER_IND
#endif
#ifndef CSR_BT_INSTALL_AVRCP_TG_13_AND_HIGHER
#define EXCLUDE_CSR_BT_AVRCP_TG_NOTI_REQ
#define EXCLUDE_CSR_BT_AVRCP_TG_PAS_SET_REQ
#define EXCLUDE_CSR_BT_AVRCP_TG_SET_ADDRESSED_PLAYER_REQ
#define EXCLUDE_CSR_BT_AVRCP_TG_NOTI_RES
#define EXCLUDE_CSR_BT_AVRCP_TG_PLAY_RES
#define EXCLUDE_CSR_BT_AVRCP_TG_SEARCH_RES
#define EXCLUDE_CSR_BT_AVRCP_TG_CHANGE_PATH_RES
#define EXCLUDE_CSR_BT_AVRCP_TG_PAS_SET_RES
#define EXCLUDE_CSR_BT_AVRCP_TG_PAS_CURRENT_RES
#define EXCLUDE_CSR_BT_AVRCP_TG_SET_VOLUME_RES
#define EXCLUDE_CSR_BT_AVRCP_TG_GET_FOLDER_ITEMS_RES
#define EXCLUDE_CSR_BT_AVRCP_TG_GET_ATTRIBUTES_RES
#define EXCLUDE_CSR_BT_AVRCP_TG_GET_PLAY_STATUS_RES
#define EXCLUDE_CSR_BT_AVRCP_TG_SET_ADDRESSED_PLAYER_RES
#define EXCLUDE_CSR_BT_AVRCP_TG_SET_BROWSED_PLAYER_RES
#define EXCLUDE_CSR_BT_AVRCP_TG_ADD_TO_NOW_PLAYING_RES

#define EXCLUDE_CSR_BT_AVRCP_TG_SET_ADDRESSED_PLAYER_CFM
#define EXCLUDE_CSR_BT_AVRCP_TG_NOTI_IND
#define EXCLUDE_CSR_BT_AVRCP_TG_PLAY_IND
#define EXCLUDE_CSR_BT_AVRCP_TG_SEARCH_IND
#define EXCLUDE_CSR_BT_AVRCP_TG_PAS_CURRENT_IND
#define EXCLUDE_CSR_BT_AVRCP_TG_CHANGE_PATH_IND
#define EXCLUDE_CSR_BT_AVRCP_TG_PAS_SET_IND
#define EXCLUDE_CSR_BT_AVRCP_TG_SET_VOLUME_IND
#define EXCLUDE_CSR_BT_AVRCP_TG_GET_FOLDER_ITEMS_IND
#define EXCLUDE_CSR_BT_AVRCP_TG_GET_PLAY_STATUS_IND
#define EXCLUDE_CSR_BT_AVRCP_TG_SET_ADDRESSED_PLAYER_IND
#define EXCLUDE_CSR_BT_AVRCP_TG_SET_BROWSED_PLAYER_IND
#define EXCLUDE_CSR_BT_AVRCP_TG_GET_ATTRIBUTES_IND
#define EXCLUDE_CSR_BT_AVRCP_TG_ADD_TO_NOW_PLAYING_IND
#define EXCLUDE_CSR_BT_AVRCP_TG_INFORM_DISP_CHARSET_IND
#define EXCLUDE_CSR_BT_AVRCP_TG_INFORM_BATTERY_STATUS_IND
#define EXCLUDE_CSR_BT_AVRCP_TG_NOTI_CFM
#define EXCLUDE_CSR_BT_AVRCP_TG_PAS_SET_CFM
#endif

#ifndef INSTALL_ULP
#define CSR_BT_EXCLUDE_BLE_ACCEPT_CONNECTION_PAR_UPDATE
#define CSR_BT_EXCLUDE_BLE_UPDATE_CONNECTION_PARAMETERS
#define CSR_BT_EXCLUDE_HCI_ULP_ADD_DEVICE_TO_WHITE_LIST
#define CSR_BT_EXCLUDE_HCI_ULP_CLEAR_WHITE_LIST
#define CSR_BT_EXCLUDE_HCI_ULP_CREATE_CONNECTION_CANCEL
#define CSR_BT_EXCLUDE_HCI_ULP_ENCRYPT
#define CSR_BT_EXCLUDE_HCI_ULP_RAND
#define CSR_BT_EXCLUDE_HCI_ULP_READ_ADVERTISING_CHANNEL_TX_POWER
#define CSR_BT_EXCLUDE_HCI_ULP_READ_CHANNEL_MAP
#define CSR_BT_EXCLUDE_HCI_ULP_READ_LOCAL_SUPPORTED_FEATURES
#define CSR_BT_EXCLUDE_HCI_ULP_READ_REMOTE_USED_FEATURES
#define CSR_BT_EXCLUDE_HCI_ULP_READ_SUPPORTED_STATES
#define CSR_BT_EXCLUDE_HCI_ULP_READ_WHITE_LIST_SIZE
#define CSR_BT_EXCLUDE_HCI_ULP_RECEIVER_TEST
#define CSR_BT_EXCLUDE_HCI_ULP_REMOVE_DEVICE_FROM_WHITE_LIST
#define CSR_BT_EXCLUDE_HCI_ULP_SET_ADVERTISE_ENABLE
#define CSR_BT_EXCLUDE_HCI_ULP_SET_ADVERTISING_DATA
#define CSR_BT_EXCLUDE_HCI_ULP_SET_ADVERTISING_PARAMETERS
#define CSR_BT_EXCLUDE_HCI_ULP_SET_EVENT_MASK
#define CSR_BT_EXCLUDE_HCI_ULP_SET_HOST_CHANNEL_CLASSIFICATION
#define CSR_BT_EXCLUDE_HCI_ULP_SET_RANDOM_ADDRESS
#define CSR_BT_EXCLUDE_HCI_ULP_SET_SCAN_ENABLE
#define CSR_BT_EXCLUDE_HCI_ULP_SET_SCAN_PARAMETERS
#define CSR_BT_EXCLUDE_HCI_ULP_SET_SCAN_RESPONSE_DATA
#define CSR_BT_EXCLUDE_HCI_ULP_TEST_END
#define CSR_BT_EXCLUDE_HCI_ULP_TRANSMITTER_TEST
#define CSR_BT_EXCLUDE_HCI_ULP_SET_PRIVACY_MODE
#endif

#ifndef INSTALL_AMP_SUPPORT
/* AMP only signals */
#define CSR_BT_EXCLUDE_AMPM_CONNECT
#define CSR_BT_EXCLUDE_AMPM_CONNECT_CHANNEL
#define CSR_BT_EXCLUDE_AMPM_DISCONNECT
#define CSR_BT_EXCLUDE_AMPM_DISCONNECT_CHANNEL
#define CSR_BT_EXCLUDE_AMPM_NUMBER_COMPLETED_DATA_BLOCKS
#define CSR_BT_EXCLUDE_AMPM_READ_BD_ADDR
#define CSR_BT_EXCLUDE_AMPM_READ_DATA_BLOCK_SIZE
#define CSR_BT_EXCLUDE_AMPM_REGISTER
#define CSR_BT_EXCLUDE_AMPM_VERIFY_PHYSICAL_LINK
/* Signals only used for AMP */
#define CSR_BT_EXCLUDE_DATA_FROM_HCI
#endif

#ifndef INSTALL_BD_ADDR_BLACK_LIST_SUPPORT
#define CSR_BT_EXCLUDE_HANDLE_DEVICE_BLACK_LIST
#endif

#ifndef CSR_BT_INSTALL_CM_GET_LINK_QUALITY
#define CSR_BT_EXCLUDE_HCI_GET_LINK_QUALITY
#endif

#ifndef CSR_BT_INSTALL_CM_AFH
#define CSR_BT_EXCLUDE_HCI_READ_AFH_CHANNEL_CLASS_M
#define CSR_BT_EXCLUDE_HCI_READ_AFH_CHANNEL_MAP
#define CSR_BT_EXCLUDE_HCI_SET_AFH_CHANNEL_CLASS
#define CSR_BT_EXCLUDE_HCI_WRITE_AFH_CHANNEL_CLASS_M
#endif

#ifndef CSR_BT_INSTALL_CM_READ_COD
#define CSR_BT_EXCLUDE_HCI_READ_CLASS_OF_DEVICE
#endif

#ifndef CSR_BT_INSTALL_CM_READ_CLOCK
#define CSR_BT_EXCLUDE_HCI_READ_CLOCK
#endif

#ifndef CSR_BT_INSTALL_CM_PRI_IAC
#define CSR_BT_EXCLUDE_HCI_READ_CURRENT_IAC_LAP
#define CSR_BT_EXCLUDE_HCI_READ_NUM_SUPPORTED_IAC
#define CSR_BT_EXCLUDE_HCI_WRITE_CURRENT_IAC_LAP
#endif

/* This requiers the csr_bt_usr_config.h to be included, which destrois the auto-gen system...
#if CSR_BT_BT_VERSION < CSR_BT_BLUETOOTH_VERSION_3P0
#define CSR_BT_EXCLUDE_HCI_READ_ENCRYPTION_KEY_SIZE 
#define CSR_BT_EXCLUDE_SM_IO_CAPABILITY_REQUEST
#define CSR_BT_EXCLUDE_SM_IO_CAPABILITY_REQUEST_NEG
#define CSR_BT_EXCLUDE_SM_SEND_KEYPRESS_NOTIFICATION
#define CSR_BT_EXCLUDE_SM_USER_CONFIRMATION_REQUEST
#define CSR_BT_EXCLUDE_SM_USER_CONFIRMATION_REQUEST_NEG
#define CSR_BT_EXCLUDE_SM_USER_PASSKEY_REQUEST
#define CSR_BT_EXCLUDE_SM_USER_PASSKEY_REQUEST_NEG
#endif
*/
#ifndef CSR_BT_INSTALL_CM_READ_FAILED_CONTACT_COUNTER
#define CSR_BT_EXCLUDE_HCI_READ_FAILED_CONTACT_COUNT
#endif

#ifndef CSR_BT_INSTALL_CM_READ_LOCAL_EXT_FEATURES
#define CSR_BT_EXCLUDE_HCI_READ_LOCAL_EXT_FEATURES
#endif

#ifndef CSR_BT_INSTALL_CM_READ_RSSI
#define CSR_BT_EXCLUDE_HCI_READ_RSSI
#endif

#ifndef CSR_BT_INSTALL_CM_READ_SCAN_EANBLE
#define CSR_BT_EXCLUDE_HCI_READ_SCAN_ENABLE
#endif

#ifndef CSR_BT_INSTALL_CM_READ_TX_POWER_LEVEL
#define CSR_BT_EXCLUDE_HCI_READ_TX_POWER_LEVEL
#endif

#ifndef CSR_BT_INSTALL_L2CAP_MODULE
#define CSR_BT_EXCLUDE_HCI_WRITE_AUTO_FLUSH_TIMEOUT
#endif

#ifndef CSR_BT_INSTALL_CM_SWITCH_ROLE_PUBLIC
#define CSR_BT_EXCLUDE_LP_WRITE_ALWAYS_MASTER_DEVICES
#endif

#ifndef CSR_BT_INSTALL_SC_AUTHENTICATE
#define CSR_BT_EXCLUDE_SM_AUTHENTICATE
#endif

#ifndef CSR_BT_INSTALL_SC_ENCRYPTION
#define CSR_BT_EXCLUDE_SM_ENCRYPT
#endif

/* Unused DM lib functions - Typically located in dm_hci_int_cc_gen.c and lib-finctions*/
#define CSR_BT_EXCLUDE_HCI_CHANGE_ACL_CONN_PKT_TYPE
#define CSR_BT_EXCLUDE_HCI_EXIT_PERIODIC_INQUIRY_MODE
#define CSR_BT_EXCLUDE_HCI_FLUSH
#define CSR_BT_EXCLUDE_HCI_PERIODIC_INQUIRY_MODE
#define CSR_BT_EXCLUDE_HCI_READ_AUTH_ENABLE
#define CSR_BT_EXCLUDE_HCI_READ_AUTO_FLUSH_TIMEOUT
#define CSR_BT_EXCLUDE_HCI_READ_CONN_ACCEPT_TIMEOUT
#define CSR_BT_EXCLUDE_HCI_READ_COUNTRY_CODE
#define CSR_BT_EXCLUDE_HCI_READ_DEFAULT_LINK_POLICY_SETTINGS
#define CSR_BT_EXCLUDE_HCI_READ_ENC_MODE
#define CSR_BT_EXCLUDE_HCI_READ_HOLD_MODE_ACTIVITY
#define CSR_BT_EXCLUDE_HCI_READ_INQUIRY_MODE
#define CSR_BT_EXCLUDE_HCI_READ_INQUIRY_RESPONSE_TX_POWER_LEVEL
#define CSR_BT_EXCLUDE_HCI_READ_INQUIRY_SCAN_TYPE
#define CSR_BT_EXCLUDE_HCI_READ_INQUIRYSCAN_ACTIVITY
#define CSR_BT_EXCLUDE_HCI_READ_LINK_SUPERV_TIMEOUT
#define CSR_BT_EXCLUDE_HCI_READ_LMP_HANDLE
#define CSR_BT_EXCLUDE_HCI_READ_NUM_BCAST_RETXS
#define CSR_BT_EXCLUDE_HCI_READ_PAGESCAN_ACTIVITY
#define CSR_BT_EXCLUDE_HCI_READ_PAGESCAN_MODE
#define CSR_BT_EXCLUDE_HCI_READ_PAGESCAN_PERIOD_MODE
#define CSR_BT_EXCLUDE_HCI_READ_PIN_TYPE
#define CSR_BT_EXCLUDE_HCI_READ_SCO_FLOW_CON_ENABLE
#define CSR_BT_EXCLUDE_HCI_READ_STORED_LINK_KEY
#define CSR_BT_EXCLUDE_HCI_READ_VOICE_SETTING
#define CSR_BT_EXCLUDE_HCI_RESET_FAILED_CONTACT_COUNT
#define CSR_BT_EXCLUDE_HCI_WRITE_CONN_ACCEPT_TIMEOUT
#define CSR_BT_EXCLUDE_HCI_WRITE_HOLD_MODE_ACTIVITY
#define CSR_BT_EXCLUDE_HCI_WRITE_NUM_BCAST_RETXS
#define CSR_BT_EXCLUDE_HCI_WRITE_PAGESCAN_MODE
#define CSR_BT_EXCLUDE_HCI_WRITE_PAGESCAN_PERIOD_MODE
#define CSR_BT_EXCLUDE_HCI_WRITE_PIN_TYPE
#define CSR_BT_EXCLUDE_HCI_WRITE_SCO_FLOW_CON_ENABLE
#define CSR_BT_EXCLUDE_HCI_WRITE_STORED_LINK_KEY
#define CSR_BT_EXCLUDE_HCI_READ_LINK_POLICY_SETTINGS
#define CSR_BT_EXCLUDE_HCI_READ_PAGE_SCAN_TYPE
#define CSR_BT_EXCLUDE_HCI_READ_PAGE_TIMEOUT
#define CSR_BT_EXCLUDE_HCI_SET_EVENT_MASK /* lib-function never reffered, but HCI-command used in core-stack */
#define CSR_BT_EXCLUDE_SM_DATA_SIGN 
#define CSR_BT_EXCLUDE_SM_GENERATE_NONRESOLVABLE_PRIVATE_ADDRESS
#define CSR_BT_EXCLUDE_SM_READ_DEVICE

#ifdef CSR_BT_INSTALL_CHANGE_ACL_PACKET_TYPE
#undef CSR_BT_EXCLUDE_HCI_CHANGE_ACL_CONN_PKT_TYPE
#endif

/* dm-excludes - These are always used:
#define CSR_BT_EXCLUDE_ACL_CLOSE
#define CSR_BT_EXCLUDE_ACL_OPEN
#define CSR_BT_EXCLUDE_AM_REGISTER
#define CSR_BT_EXCLUDE_CLEAR_PARAM_CACHE
#define CSR_BT_EXCLUDE_HCI_CHANGE_LOCAL_NAME
#define CSR_BT_EXCLUDE_HCI_CREATE_CONNECTION_CANCEL
#define CSR_BT_EXCLUDE_HCI_DELETE_STORED_LINK_KEY
#define CSR_BT_EXCLUDE_HCI_EXIT_SNIFF_MODE
#define CSR_BT_EXCLUDE_HCI_INQUIRY
#define CSR_BT_EXCLUDE_HCI_INQUIRY_CANCEL
#define CSR_BT_EXCLUDE_HCI_QOS_SETUP
#define CSR_BT_EXCLUDE_HCI_READ_BD_ADDR
#define CSR_BT_EXCLUDE_HCI_READ_CLOCK_OFFSET
#define CSR_BT_EXCLUDE_HCI_READ_LOCAL_SUPP_FEATURES
#define CSR_BT_EXCLUDE_HCI_READ_LOCAL_VER_INFO
#define CSR_BT_EXCLUDE_HCI_READ_REMOTE_EXT_FEATURES
#define CSR_BT_EXCLUDE_HCI_READ_REMOTE_SUPP_FEATURES
#define CSR_BT_EXCLUDE_HCI_READ_REMOTE_VER_INFO
#define CSR_BT_EXCLUDE_HCI_REMOTE_NAME_REQUEST
#define CSR_BT_EXCLUDE_HCI_REMOTE_NAME_REQ_CANCEL
#define CSR_BT_EXCLUDE_HCI_ROLE_DISCOVERY
#define CSR_BT_EXCLUDE_HCI_SET_EVENT_FILTER
#define CSR_BT_EXCLUDE_HCI_SNIFF_MODE
#define CSR_BT_EXCLUDE_HCI_SNIFF_SUB_RATE
#define CSR_BT_EXCLUDE_HCI_SWITCH_ROLE
#define CSR_BT_EXCLUDE_HCI_WRITE_CLASS_OF_DEVICE
#define CSR_BT_EXCLUDE_HCI_WRITE_INQUIRYSCAN_ACTIVITY
#define CSR_BT_EXCLUDE_HCI_WRITE_INQUIRY_MODE
#define CSR_BT_EXCLUDE_HCI_WRITE_INQUIRY_SCAN_TYPE
#define CSR_BT_EXCLUDE_HCI_WRITE_INQUIRY_TRANSMIT_POWER_LEVEL
#define CSR_BT_EXCLUDE_HCI_WRITE_LINK_POLICY_SETTINGS
#define CSR_BT_EXCLUDE_HCI_WRITE_LINK_SUPERV_TIMEOUT
#define CSR_BT_EXCLUDE_HCI_WRITE_PAGESCAN_ACTIVITY
#define CSR_BT_EXCLUDE_HCI_WRITE_PAGE_SCAN_TYPE
#define CSR_BT_EXCLUDE_HCI_WRITE_PAGE_TIMEOUT
#define CSR_BT_EXCLUDE_HCI_WRITE_DEFAULT_LINK_POLICY_SETTINGS
#define CSR_BT_EXCLUDE_HCI_WRITE_SCAN_ENABLE
#define CSR_BT_EXCLUDE_LINK_KEY_REQUEST
#define CSR_BT_EXCLUDE_LP_WRITE_ROLESWITCH_POLICY
#define CSR_BT_EXCLUDE_SET_BT_VERSION
#define CSR_BT_EXCLUDE_SET_DEFAULT_LINK_POLICY
#define CSR_BT_EXCLUDE_SM_AUTHORISE
#define CSR_BT_EXCLUDE_SM_BONDING
#define CSR_BT_EXCLUDE_SM_BONDING_CANCEL
#define CSR_BT_EXCLUDE_SM_INIT
#define CSR_BT_EXCLUDE_SM_KEY_REQUEST
#define CSR_BT_EXCLUDE_SM_KEY_REQUEST_NEG
#define CSR_BT_EXCLUDE_SM_PIN_REQUEST
#define CSR_BT_EXCLUDE_SM_REGISTER
#define CSR_BT_EXCLUDE_SM_REGISTER_OUTGOING
#define CSR_BT_EXCLUDE_SM_REMOVE_DEVICE
#define CSR_BT_EXCLUDE_SM_UNREGISTER
#define CSR_BT_EXCLUDE_SM_UNREGISTER_OUTGOING
#define CSR_BT_EXCLUDE_WRITE_CACHED_CLOCK_OFFSET
#define CSR_BT_EXCLUDE_WRITE_CACHED_PAGE_MODE
#define CSR_BT_EXCLUDE_SM_CONFIGURE_LOCAL_ADDRESS

*/

#if CSR_BT_BT_VERSION == CSR_BT_BLUETOOTH_VERSION_5P3
#define DM_BT_VERSION BT_VERSION_5p3
#elif CSR_BT_BT_VERSION == CSR_BT_BLUETOOTH_VERSION_5P2
#define DM_BT_VERSION BT_VERSION_5p2
#elif CSR_BT_BT_VERSION == CSR_BT_BLUETOOTH_VERSION_5P1
#define DM_BT_VERSION BT_VERSION_5p1
#elif CSR_BT_BT_VERSION == CSR_BT_BLUETOOTH_VERSION_5P0
#define DM_BT_VERSION BT_VERSION_5p0
#elif CSR_BT_BT_VERSION == CSR_BT_BLUETOOTH_VERSION_4P2
#define DM_BT_VERSION BT_VERSION_4p2
#elif CSR_BT_BT_VERSION == CSR_BT_BLUETOOTH_VERSION_4P1
#define DM_BT_VERSION BT_VERSION_4p1
#elif CSR_BT_BT_VERSION == CSR_BT_BLUETOOTH_VERSION_4P0
#define DM_BT_VERSION BT_VERSION_4p0
#elif CSR_BT_BT_VERSION == CSR_BT_BLUETOOTH_VERSION_3P0
#define DM_BT_VERSION BT_VERSION_3p0
#else
#define DM_BT_VERSION BT_VERSION_2p1
#endif

#if defined(CSR_TARGET_PRODUCT_VM)
/* Start of ADK Specific configurations */

/* Extended TD DB Support for 12 devices */
/* #define INSTALL_EXTENDED_TD_DB */

/* Enables interface for application to respond to Bluestack's Key Request Indication */
/* #define INSTALL_CM_KEY_REQUEST_INDICATION */

#ifndef EXCLUDE_CSR_BT_AVRCP_MODULE
#ifndef EXCLUDE_CSR_BT_AVRCP_MODULE_OPTIONAL
#undef CSR_BT_INSTALL_AVRCP_PLAYER_APP_SETTINGS
#undef INSTALL_AVRCP_CUSTOM_SECURITY_SETTINGS
#undef INSTALL_AVRCP_METADATA_ATTRIBUTES
#undef INSTALL_AVRCP_NOTIFICATIONS
#undef INSTALL_AVRCP_DEACTIVATE
#undef INSTALL_AVRCP_CANCEL_CONNECT
#undef INSTALL_AVRCP_MEDIA_PLAYER_SELECTION

#ifdef INSTALL_AVRCP_MEDIA_PLAYER_SELECTION
#define CSR_BT_INSTALL_AVRCP_BROWSING
#define INSTALL_AVRCP_METADATA_ATTRIBUTES
#endif

#ifdef CSR_BT_INSTALL_AVRCP_BROWSING
#ifndef INSTALL_AVRCP_METADATA_ATTRIBUTES
#define INSTALL_AVRCP_METADATA_ATTRIBUTES
#endif
#endif

#endif /*!EXCLUDE_CSR_BT_AVRCP_MODULE_OPTIONAL*/
#define CSR_BT_AVRCP_IGNORE_PENDING_LIST
#endif /*!EXCLUDE_CSR_BT_AVRCP_MODULE*/

#ifndef EXCLUDE_CSR_BT_HF_MODULE
#define CSR_BT_HF_ENABLE_SWB_SUPPORT
#define CSR_BT_INSTALL_APP_APT_HANDLING
#endif /*!EXCLUDE_CSR_BT_HF_MODULE*/

#ifndef EXCLUDE_CSR_BT_SPP_MODULE
#undef INSTALL_SPP_MODEM_STATUS_COMMAND
#undef INSTALL_SPP_OUTGOING_CONNECTION
#endif /*!EXCLUDE_CSR_BT_SPP_MODULE*/

#ifndef EXCLUDE_CSR_BT_CM_MODULE
#ifdef EXCLUDE_CSR_BT_CM_MODULE_OPTIONAL
#define CSR_BT_INSTALL_CM_PRI_CONNECT_EXT
#define CSR_BT_INSTALL_CM_READ_LOCAL_NAME
#undef EXCLUDE_CSR_BT_CM_READ_LOCAL_NAME_REQ
#undef EXCLUDE_CSR_BT_CM_READ_LOCAL_NAME_CFM

#define CSR_BT_INSTALL_CM_WRITE_COD
#undef CSR_BT_INSTALL_CM_AUTO_UPDATE_COD

#define CSR_BT_INSTALL_CM_SWITCH_ROLE_PUBLIC
#undef CSR_BT_EXCLUDE_LP_WRITE_ALWAYS_MASTER_DEVICES

#define CSR_BT_INSTALL_CM_WRITE_PAGE_SCAN
#define CSR_BT_INSTALL_CM_WRITE_INQUIRY_SCAN_TYPE
#define CSR_BT_INSTALL_CM_LINK_POLICY
#define CSR_BT_INSTALL_CM_PRI_IAC
#undef CSR_BT_EXCLUDE_HCI_READ_CURRENT_IAC_LAP
#undef CSR_BT_EXCLUDE_HCI_READ_NUM_SUPPORTED_IAC
#undef CSR_BT_EXCLUDE_HCI_WRITE_CURRENT_IAC_LAP

#define CSR_BT_INSTALL_CM_WRITE_LINK_SUPERVISION_TIMEOUT
#define CSR_BT_INSTALL_CM_PRI_L2CA_CONNECT_CONFTAB
#define CSR_BT_INSTALL_128_BIT_SERVICE_SEARCH
#define CSR_BT_INSTALL_CM_READ_RSSI
#undef CSR_BT_EXCLUDE_HCI_READ_RSSI

#define CSR_BT_INSTALL_CM_GET_LINK_QUALITY
#undef CSR_BT_EXCLUDE_HCI_GET_LINK_QUALITY

#define CSR_BT_INSTALL_CM_EVENT_MASK_SUBSCRIBE_ENCRYPT_CHANGE
#define CSR_BT_INSTALL_CM_WRITE_PAGE_TO
#define CSR_BT_INSTALL_CM_EVENT_MASK_SUBSCRIBE_ROLE_CHANGE
#define CSR_BT_INSTALL_CM_EVENT_MASK_SUBSCRIBE_MODE_CHANGE
#define CSR_BT_INSTALL_CM_EVENT_MASK_SUBSCRIBE_LSTO_CHANGE
#define CSR_BT_INSTALL_LP_POWER_TABLE
#define CSR_BT_INSTALL_CM_SET_LINK_BEHAVIOR
#define CSR_BT_INSTALL_CM_READ_TX_POWER_LEVEL
#undef CSR_BT_EXCLUDE_HCI_READ_TX_POWER_LEVEL

#define CSR_BT_INSTALL_CM_DISABLE_AUTO_DISC_RESP
#define CSR_BT_INSTALL_CM_SWB_DISABLE_STATE
#define INSTALL_CM_REGISTER_APP_HANDLE

/* CM initialization optional step flags */
#define CM_INIT_READ_LOCAL_VERSION
#define CM_INIT_READ_LOCAL_FEATURES
#define CM_INIT_LE_READ_LOCAL_SUPP_FEATURES
#define CM_INIT_WRITE_INQUIRY_MODE
#define CM_INIT_SET_BT_VERSION
#define CM_INIT_LP_WRITE_ROLESWITCH_POLICY_REQ
#define CM_INIT_SET_DEFAULT_LINK_POLICY_REQ
#define CM_INIT_SM_INIT_REQ

#ifdef CSR_BT_INSTALL_CM_AUTO_SCAN_ENABLE
#undef CSR_BT_INSTALL_CM_AUTO_SCAN_ENABLE
#endif /*CSR_BT_INSTALL_CM_AUTO_SCAN_ENABLE*/
#ifdef CSR_BT_INSTALL_CM_AUTO_EIR
#undef CSR_BT_INSTALL_CM_AUTO_EIR
#endif /*CSR_BT_INSTALL_CM_AUTO_EIR*/
#endif /*EXCLUDE_CSR_BT_CM_MODULE_OPTIONAL*/
#endif /*!EXCLUDE_CSR_BT_CM_MODULE*/

#ifndef EXCLUDE_CSR_BT_SC_MODULE
#error EXCLUDE_CSR_BT_SC_MODULE should be defined for V&M platforms
#endif /*!EXCLUDE_CSR_BT_SC_MODULE*/

#define CSR_BT_CM_SDC_RESULT_COUNT_MAX  0x08

#ifdef EXCLUDE_CSR_BT_SD_MODULE
#define CSR_BT_SD_IFACEQUEUE            CSR_SCHED_QID_INVALID
#else /*!EXCLUDE_CSR_BT_SD_MODULE*/
#error EXCLUDE_CSR_BT_SD_MODULE should be defined for V&M platforms
#endif /*EXCLUDE_CSR_BT_SD_MODULE*/

#define EXCLUDE_CSR_BT_CM_L2CA_DATA_REQ
#define CSR_BT_RESTRICT_MAX_PROFILE_CONNECTIONS

/* MBLK is not used on V&M platforms */
#ifdef ENABLE_ADV_REPORTING_WITH_MBLK
#undef ENABLE_ADV_REPORTING_WITH_MBLK
#endif /*ENABLE_ADV_REPORTING_WITH_MBLK*/

#define CSR_BT_GATT_INSTALL_CLIENT_SERVICE_REGISTRATION

#ifndef INSTALL_ISOC_SUPPORT
#define INSTALL_ISOC_SUPPORT
#endif /*!INSTALL_ISOC_SUPPORT*/

#ifndef CSR_BT_INSTALL_ISOC_SUPPORT
#define CSR_BT_INSTALL_ISOC_SUPPORT
#endif /*!CSR_BT_INSTALL_ISOC_SUPPORT*/

#ifndef INSTALL_STREAM_MODULE
#define INSTALL_STREAM_MODULE
#endif /*!INSTALL_STREAM_MODULE*/

/* LEA Features */
#ifndef EXCLUDE_CSR_BT_BAP_BROADCAST_MODULE
#define INSTALL_BAP_BROADCAST_SOURCE
#endif /*!EXCLUDE_CSR_BT_BAP_BROADCAST_MODULE*/

#ifndef EXCLUDE_CSR_BT_BAP_BROADCAST_ASSISTANT_MODULE
#define INSTALL_BAP_BROADCAST_ASSISTANT
#endif /*!EXCLUDE_CSR_BT_BAP_BROADCAST_ASSISTANT_MODULE*/

#define CSR_BT_GLOBAL_INSTANCE

/* ---------- V&M Application Dependent Flags ---------- */
/* This flags are toggled by passing parameters to Synergy VM Makefile using 
   "Build_Parameters" section in x2p file. For applications including the header 
   these are disabled 
*/
#if defined (SYNERGY_VM_SOURCE_APP_ENABLED)
#ifndef EXCLUDE_CSR_BT_CM_MODULE
#define INSTALL_CM_INQUIRY
#define CSR_BT_INSTALL_CM_SC_MODE_CONFIG
#define INSTALL_CM_CLEAR_EVENT_FILTER
#define INSTALL_CM_SET_EVENT_FILTER_COD
#endif /* !EXCLUDE_CSR_BT_CM_MODULE */

#ifndef EXCLUDE_CSR_BT_HFG_MODULE
#define CSR_BT_HFG_ENABLE_SWB_SUPPORT
#endif /* !EXCLUDE_CSR_BT_HFG_MODULE */

#ifndef EXCLUDE_CSR_BT_AVRCP_MODULE
#define INSTALL_AVRCP_NOTIFICATIONS
#define INSTALL_AVRCP_MEDIA_PLAYER_SELECTION
#define INSTALL_AVRCP_METADATA_ATTRIBUTES
#define CSR_BT_INSTALL_AVRCP_BROWSING
#endif /* !EXCLUDE_CSR_BT_AVRCP_MODULE */

#elif defined (SYNERGY_VM_HEADSET_APP_ENABLED)

#else
/*Earbud app (default) section */
#endif /*End of App dependent flags*/
/* End of ADK configuration */
#elif defined(CSR_TARGET_PRODUCT_AUTO)
/* Start of AUTO Specific configurations */
#define CSR_BT_GATT_INSTALL_CLIENT_SERVICE_REGISTRATION
#ifdef CSR_BT_ISOC_ENABLE
#define INSTALL_ISOC_SUPPORT
#endif

#ifndef EXCLUDE_CSR_BT_BAP_BROADCAST_MODULE
#define INSTALL_BAP_BROADCAST_SOURCE
#endif

#ifndef EXCLUDE_CSR_BT_BAP_BROADCAST_ASSISTANT_MODULE
#define INSTALL_BAP_BROADCAST_ASSISTANT
#endif

#ifndef EXCLUDE_CSR_BT_AUTO_BROADCAST_DEMO
#define AUTO_BRCST
#endif

#ifdef CSR_BT_WEAR_CONTEXT_TO_FILE
#ifdef RFCOMM_MULTI_THREAD
#undef RFCOMM_MULTI_THREAD
#endif

#ifndef ATT_GLOBAL_STATE
#define ATT_GLOBAL_STATE
#endif

#endif /* ifdef CSR_BT_WEAR_CONTEXT_TO_FILE */
/* End of AUTO configuration */

#elif defined(CSR_TARGET_PRODUCT_IOT)
/* Start of IOT Specific configurations */
#define DISABLE_DM_BREDR

#if defined(DISABLE_DM_BREDR) && !defined(INSTALL_L2CAP_LECOC_CB)
#define DISABLE_L2CAP_CONNECTION_FSM_SUPPORT
#endif

#ifdef INSTALL_L2CAP_ENHANCED_SUPPORT
#undef INSTALL_L2CAP_ENHANCED_SUPPORT
#endif

#ifdef INSTALL_ATT_BREDR
#undef INSTALL_ATT_BREDR
#endif

#ifdef INSTALL_DM_SYNC_MODULE
#undef INSTALL_DM_SYNC_MODULE
#endif

#ifdef INSTALL_DM_CONNECTIONLESS_FSM
#undef INSTALL_DM_CONNECTIONLESS_FSM
#endif

#ifndef ATT_REFACTOR
#define ATT_REFACTOR
#endif

#ifdef ENABLE_SHUTDOWN
#undef ENABLE_SHUTDOWN
#endif

#ifndef ATT_GLOBAL_STATE
#define ATT_GLOBAL_STATE 
#endif

#define EXCLUDE_WRITE_CMD_API
#define EXCLUDE_HANDLE_VALUE_NTF_API
#define EXCLUDE_ATT_UNREGISTER_API

/* RFCOMM mandatory settings */
#ifndef INSTALL_RFCOMM_MODULE
#undef INSTALL_RFCOMM_MODULE
#undef RFCOMM_MULTI_THREAD
#endif /* INSTALL_RFCOMM_MODULE */

#define CSR_BT_GATT_INSTALL_CLIENT_SERVICE_REGISTRATION
/* End of IOT Configuration */
#elif defined(CSR_TARGET_PRODUCT_WEARABLE)

/* Start of WEARABLE Specific configurations */


#define CSR_BT_GATT_INSTALL_CLIENT_SERVICE_REGISTRATION
#define INSTALL_CM_REGISTER_APP_HANDLE

#ifdef CSR_BT_INSTALL_CM_AUTO_SCAN_ENABLE
#undef CSR_BT_INSTALL_CM_AUTO_SCAN_ENABLE
#endif /*CSR_BT_INSTALL_CM_AUTO_SCAN_ENABLE*/
#ifdef CSR_BT_INSTALL_CM_AUTO_EIR
#undef CSR_BT_INSTALL_CM_AUTO_EIR
#endif /*CSR_BT_INSTALL_CM_AUTO_EIR*/

#ifdef RFCOMM_MULTI_THREAD
#undef RFCOMM_MULTI_THREAD
#endif

#ifndef ATT_GLOBAL_STATE
#define ATT_GLOBAL_STATE 
#endif

#ifdef CSR_BT_SLATE_FULL_CONFIG

#ifdef CSR_BT_ISOC_ENABLE
#define INSTALL_ISOC_SUPPORT
#endif

#ifndef EXCLUDE_CSR_BT_BAP_BROADCAST_MODULE
#define INSTALL_BAP_BROADCAST_SOURCE
#endif

#ifndef EXCLUDE_CSR_BT_BAP_BROADCAST_ASSISTANT_MODULE
#define INSTALL_BAP_BROADCAST_ASSISTANT
#endif

#ifndef EXCLUDE_CSR_BT_AUTO_BROADCAST_DEMO
#define AUTO_BRCST
#endif

#else

#ifdef INSTALL_ATT_BREDR
#undef INSTALL_ATT_BREDR
#endif

#endif /* ifdef CSR_BT_SLATE_FULL_CONFIG */

/* By default have log enabled for wearables */
#define CSR_LOG_ENABLE

#define CSR_BT_GLOBAL_INSTANCE
#define EXCLUDE_DM_SM_SIRK_OPERATION_REQ


#ifdef INSTALL_BT_STANDALONE_MODE

#define INSTALL_2LE

#ifndef CSR_BT_GATT_CACHING
#define CSR_BT_GATT_CACHING
#endif

#define INSTALL_L2CAP_LECOC_TX_SEG

#ifndef MAX_BUFFERED_L2CAP_REQUESTS
#ifdef INSTALL_L2CAP_LECOC_TX_SEG
#define MAX_BUFFERED_L2CAP_REQUESTS                 (0x08) /* default number of pending datawrites for basic mode */
#endif
#endif

#else
#define INSTALL_CTM
#define INSTALL_CONTEXT_TRANSFER

#define INCLUDE_BT_WEARABLE_TD_DB_MEM
#endif

#ifndef EXCLUDE_CSR_BT_AVRCP_MODULE
#ifndef EXCLUDE_CSR_BT_AVRCP_MODULE_OPTIONAL
#undef CSR_BT_INSTALL_AVRCP_PLAYER_APP_SETTINGS

#ifdef INSTALL_AVRCP_MEDIA_PLAYER_SELECTION
#define CSR_BT_INSTALL_AVRCP_BROWSING
#define INSTALL_AVRCP_METADATA_ATTRIBUTES
#endif

#ifdef CSR_BT_INSTALL_AVRCP_BROWSING
#ifndef INSTALL_AVRCP_METADATA_ATTRIBUTES
#define INSTALL_AVRCP_METADATA_ATTRIBUTES
#endif
#endif

#endif /*!EXCLUDE_CSR_BT_AVRCP_MODULE_OPTIONAL*/
#define CSR_BT_AVRCP_IGNORE_PENDING_LIST
#endif /*!EXCLUDE_CSR_BT_AVRCP_MODULE*/

#ifndef EXCLUDE_CSR_BT_AV_MODULE 
#ifndef EXCLUDE_CSR_BT_AV_OPTIONAL
#undef INSTALL_AV_STREAM_DATA_APP_SUPPORT
#endif /* EXCLUDE_CSR_BT_AV_OPTIONAL */
#endif /* EXCLUDE_CSR_BT_AV_MODULE */

/* #define CSR_BT_INSTALL_CRYPTO_SUPPORT */

#define CSR_BT_INSTALL_CM_PRI_L2CA_CONNECT_CONFTAB /* Used by a few tester/tester test cases */
#define CSR_BT_INSTALL_CM_SET_LINK_BEHAVIOR
#define CSR_BT_INSTALL_CM_DISABLE_AUTO_DISC_RESP

/* Temp */
#ifdef STANDALONE_DUT_PLUS
#ifndef INCLUDE_BT_WEARABLE_TD_DB_PS
#define INCLUDE_BT_WEARABLE_TD_DB_PS
#endif
#else
#ifndef INCLUDE_BT_WEARABLE_TD_DB_MEM
#define INCLUDE_BT_WEARABLE_TD_DB_MEM
#endif
#endif

/* End of WEARABLE configuration */

#elif defined(CSR_TARGET_PRODUCT_NONE)
/* Start of full-le configurations */
#define CSR_BT_GATT_INSTALL_CLIENT_HANDLE_SUBSCRIPTION
#ifdef CSR_BT_WEAR_CONTEXT_TO_FILE
#ifdef RFCOMM_MULTI_THREAD
#undef RFCOMM_MULTI_THREAD
#endif

#ifndef ATT_GLOBAL_STATE
#define ATT_GLOBAL_STATE 
#endif
#endif /* ifdef CSR_BT_WEAR_CONTEXT_TO_FILE */
/* End of full-le configuration */
#endif /* (CSR_TARGET_PRODUCT_VM) */

#if (CSR_HOST_PLATFORM == QCC5100_HOST)
#ifdef CSR_BT_GATT_INSTALL_FLAT_DB
#undef CSR_BT_GATT_INSTALL_FLAT_DB
#endif
#endif

#ifdef CSR_BT_GATT_INSTALL_FLAT_DB
#define ATT_FLAT_DB_SUPPORT
#define EXCLUDE_ATT_ADD_REQ
#define EXCLUDE_ATT_ADD_CFM
#endif

/* Gatt dbgen defines */
#ifndef ASCS_SUPPORT_8_ASES
#undef ASCS_SUPPORT_8_ASES
#endif /*!ASCS_SUPPORT_8_ASES*/

#if defined(CSR_TARGET_PRODUCT_AUTO) || defined(CSR_TARGET_PRODUCT_WEARABLE)
#define BLUESTACK_SAFE_FUNCTIONS_AVAILABLE
#define qbl_memscpy SynMemCpyS
#define qbl_memsmove SynMemMoveS
#endif

#ifdef __cplusplus
}
#endif


#endif
